aboutsummaryrefslogtreecommitdiff
path: root/lib/lib.h
diff options
context:
space:
mode:
authorRob Landley <rob@landley.net>2007-01-07 22:51:12 -0500
committerRob Landley <rob@landley.net>2007-01-07 22:51:12 -0500
commit1322beb384ea43a15c17f8229e7db070949dd331 (patch)
tree8cd23c638a6b6aeffa0a761025848e7bce60d4f1 /lib/lib.h
parent016bf8289e12346f45f543d5b048d2496f4f0256 (diff)
downloadtoybox-1322beb384ea43a15c17f8229e7db070949dd331.tar.gz
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.
Diffstat (limited to 'lib/lib.h')
-rw-r--r--lib/lib.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/lib.h b/lib/lib.h
index 6a398c1a..cb140275 100644
--- a/lib/lib.h
+++ b/lib/lib.h
@@ -38,7 +38,8 @@ void *xstrndup(char *s, size_t n);
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 {
struct mtab_list *getmountlist(int die);
+char *bunzipStream(int src_fd, int dst_fd);