aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorRob Landley <rob@landley.net>2006-07-16 08:14:35 +0000
committerRob Landley <rob@landley.net>2006-07-16 08:14:35 +0000
commit534374755d618c9c36c9940c82756241c4b25a67 (patch)
treefac906b4fa40a68c53cecf20215a7a25b3b1cab6 /include
parentafb94ecf2bb6c53ce2a381d6ce45a426243c76d9 (diff)
downloadbusybox-534374755d618c9c36c9940c82756241c4b25a67.tar.gz
Cleaup read() and write() variants, plus a couple of new functions like
xlseek and fdlength() for the new mkswap.
Diffstat (limited to 'include')
-rw-r--r--include/libbb.h12
-rw-r--r--include/unarchive.h1
2 files changed, 7 insertions, 6 deletions
diff --git a/include/libbb.h b/include/libbb.h
index 549b4fc0c..ddf965fbf 100644
--- a/include/libbb.h
+++ b/include/libbb.h
@@ -133,9 +133,9 @@ extern DIR *bb_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 bb_full_read(int fd, void *buf, size_t len);
+extern ssize_t full_read(int fd, void *buf, size_t len);
extern ssize_t safe_write(int fd, const void *buf, size_t count);
-extern ssize_t bb_full_write(int fd, const void *buf, size_t len);
+extern ssize_t full_write(int fd, const void *buf, size_t len);
extern int recursive_action(const char *fileName, int recurse,
int followLinks, int depthFirst,
int (*fileAction) (const char *fileName, struct stat* statbuf, void* userData),
@@ -187,6 +187,7 @@ extern void itoa_to_buf(int n, char *buf, unsigned buflen);
extern char *itoa(int n);
extern void xsetgid(gid_t gid);
extern void xsetuid(uid_t uid);
+extern off_t fdlength(int fd);
#define BB_GETOPT_ERROR 0x80000000UL
extern const char *bb_opt_complementally;
@@ -477,9 +478,10 @@ extern int obscure(const char *old, const char *newval, const struct passwd *pwd
extern int bb_xopen(const char *pathname, int flags);
extern int bb_xopen3(const char *pathname, int flags, int mode);
-extern ssize_t bb_xread(int fd, void *buf, size_t count);
-extern void bb_xread_all(int fd, void *buf, size_t count);
-extern unsigned char bb_xread_char(int fd);
+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);
#ifndef COMM_LEN
#ifdef TASK_COMM_LEN
diff --git a/include/unarchive.h b/include/unarchive.h
index 752a05c86..05ab0c16a 100644
--- a/include/unarchive.h
+++ b/include/unarchive.h
@@ -96,7 +96,6 @@ extern char get_header_tar_gz(archive_handle_t *archive_handle);
extern void seek_by_jump(const archive_handle_t *archive_handle, const unsigned int amount);
extern void seek_by_char(const archive_handle_t *archive_handle, const unsigned int amount);
-extern void archive_xread_all(const archive_handle_t *archive_handle, void *buf, const size_t count);
extern ssize_t archive_xread_all_eof(archive_handle_t *archive_handle, unsigned char *buf, size_t count);
extern void data_align(archive_handle_t *archive_handle, const unsigned short boundary);