diff lib/lib.h @ 49:bb4c38853a7d

xopen() wants 2 arguments unless you're creating a file, in which case you need 3. Doing varargs for this doesn't really appeal to me (bugs in waiting) so I made an xcreate() that takes 3 args, and had xopen() call it with 0 for the third argument. That way, if we feed O_CREAT to xopen() the permission 000 result should be easy to spot.
author Rob Landley <rob@landley.net>
date Sun, 07 Jan 2007 22:51:12 -0500
parents f2c7f0799ebe
children 63c168b65fa6
line wrap: on
line diff
--- a/lib/lib.h	Sun Jan 07 03:48:26 2007 -0500
+++ b/lib/lib.h	Sun Jan 07 22:51:12 2007 -0500
@@ -38,7 +38,8 @@
 void *xstrdup(char *s);
 char *xmsprintf(char *format, ...);
 void xexec(char **argv);
-int xopen(char *path, int flags, int mode);
+int xcreate(char *path, int flags, int mode);
+int xopen(char *path, int flags);
 FILE *xfopen(char *path, char *mode);
 ssize_t reread(int fd, void *buf, size_t count);
 ssize_t readall(int fd, void *buf, size_t count);
@@ -63,3 +64,4 @@
 struct mtab_list *getmountlist(int die);
+char *bunzipStream(int src_fd, int dst_fd);