From 7ffe1338647d2b890df3ae46e526410b21a90d18 Mon Sep 17 00:00:00 2001 From: Glenn L McGrath Date: Fri, 21 Nov 2003 22:24:57 +0000 Subject: As we no longer use function pointers for read in common archiving code archive_xread can be replaced with bb_full_read, and archive_copy_file with bb_copyfd* bb_copyfd is split into two functions bb_copyfd_size and bb_copyfd_eof, they share a common backend. --- include/libbb.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'include/libbb.h') diff --git a/include/libbb.h b/include/libbb.h index 22a77e610..5ff49114b 100644 --- a/include/libbb.h +++ b/include/libbb.h @@ -136,7 +136,8 @@ extern long *find_pid_by_name( const char* pidName); extern char *find_real_root_device_name(const char* name); extern char *bb_get_line_from_file(FILE *file); extern char *bb_get_chomped_line_from_file(FILE *file); -extern int bb_copyfd(int fd1, int fd2, const off_t chunksize); +extern int bb_copyfd_size(int fd1, int fd2, const off_t size); +extern int bb_copyfd_eof(int fd1, int fd2); extern void bb_xprint_and_close_file(FILE *file); extern int bb_xprint_file_by_name(const char *filename); extern char bb_process_escape_sequence(const char **ptr); @@ -480,6 +481,6 @@ extern void xregcomp(regex_t *preg, const char *regex, int cflags); #define HASH_SHA1 1 #define HASH_MD5 2 extern int hash_fd(int fd, const size_t size, const uint8_t hash_algo, uint8_t *hashval); - +extern size_t bb_full_fd_action(int src_fd, int dst_fd, const size_t size, ssize_t (*action)(int fd, const void *, size_t)); #endif /* __LIBCONFIG_H__ */ -- cgit v1.2.3