diff options
author | Denis Vlasenko | 2006-10-14 02:23:43 +0000 |
---|---|---|
committer | Denis Vlasenko | 2006-10-14 02:23:43 +0000 |
commit | ea62077b850076c4d7dc3cf78ebd1888928c6ddf (patch) | |
tree | 37b7584ae40b99edb5583fbc4392b62ffdadf278 /include | |
parent | 88ca06769028e442bf873b270c176ca0e9f021f8 (diff) | |
download | busybox-ea62077b850076c4d7dc3cf78ebd1888928c6ddf.zip busybox-ea62077b850076c4d7dc3cf78ebd1888928c6ddf.tar.gz |
add open_read_close() and similar stuff
Diffstat (limited to 'include')
-rw-r--r-- | include/libbb.h | 23 |
1 files changed, 15 insertions, 8 deletions
diff --git a/include/libbb.h b/include/libbb.h index 767a337..0bcabf1 100644 --- a/include/libbb.h +++ b/include/libbb.h @@ -205,12 +205,22 @@ extern int is_directory(const char *name, int followLinks, struct stat *statBuf) extern DIR *warn_opendir(const char *path); extern DIR *xopendir(const char *path); -extern int remove_file(const char *path, int flags); -extern int copy_file(const char *source, const char *dest, int flags); extern ssize_t safe_read(int fd, void *buf, size_t count); -extern ssize_t full_read(int fd, void *buf, size_t len); +extern ssize_t full_read(int fd, void *buf, size_t count); +extern void xread(int fd, void *buf, size_t count); +extern unsigned char xread_char(int fd); +extern char *reads(int fd, char *buf, size_t count); +ssize_t read_close(int fd, void *buf, size_t count); +ssize_t open_read_close(const char *filename, void *buf, size_t count); +void *xmalloc_open_read_close(const char *filename, size_t *sizep); + extern ssize_t safe_write(int fd, const void *buf, size_t count); -extern ssize_t full_write(int fd, const void *buf, size_t len); +extern ssize_t full_write(int fd, const void *buf, size_t count); +extern void xwrite(int fd, void *buf, size_t count); + +extern int remove_file(const char *path, int flags); +extern int copy_file(const char *source, const char *dest, int flags); + extern int recursive_action(const char *fileName, int recurse, int followLinks, int depthFirst, int (*fileAction) (const char *fileName, struct stat* statbuf, void* userData), @@ -592,10 +602,7 @@ extern int obscure(const char *old, const char *newval, const struct passwd *pwd extern void xsetenv(const char *key, const char *value); extern int xopen(const char *pathname, int flags); extern int xopen3(const char *pathname, int flags, int mode); -extern void xread(int fd, void *buf, size_t count); -extern unsigned char xread_char(int fd); -extern void xlseek(int fd, off_t offset, int whence); -extern void xwrite(int fd, void *buf, size_t count); +extern off_t xlseek(int fd, off_t offset, int whence); extern const char bb_uuenc_tbl_base64[]; extern const char bb_uuenc_tbl_std[]; |