diff options
| author | Denis Vlasenko <vda.linux@googlemail.com> | 2006-12-22 00:21:07 +0000 |
|---|---|---|
| committer | Denis Vlasenko <vda.linux@googlemail.com> | 2006-12-22 00:21:07 +0000 |
| commit | 714701c890b5f03253c5ecdb7367c4258ce78715 (patch) | |
| tree | 7ddaf73cf2deda0f357b21802dab4d42798dd778 /include | |
| parent | 0a8a7741795880201bcf78231d1eab0e2538bb0b (diff) | |
| download | busybox-w32-714701c890b5f03253c5ecdb7367c4258ce78715.tar.gz busybox-w32-714701c890b5f03253c5ecdb7367c4258ce78715.tar.bz2 busybox-w32-714701c890b5f03253c5ecdb7367c4258ce78715.zip | |
tar et al: die if bb_copyfd_size copies less than asked for.
(we have bb_copyfd_exact_size now for that kind of usage)
Diffstat (limited to 'include')
| -rw-r--r-- | include/libbb.h | 7 | ||||
| -rw-r--r-- | include/unarchive.h | 2 |
2 files changed, 7 insertions, 2 deletions
diff --git a/include/libbb.h b/include/libbb.h index 2fd54e789..2bfeba4e1 100644 --- a/include/libbb.h +++ b/include/libbb.h | |||
| @@ -203,8 +203,13 @@ extern int recursive_action(const char *fileName, int recurse, | |||
| 203 | extern int device_open(const char *device, int mode); | 203 | extern int device_open(const char *device, int mode); |
| 204 | extern int get_console_fd(void); | 204 | extern int get_console_fd(void); |
| 205 | extern char *find_block_device(char *path); | 205 | extern char *find_block_device(char *path); |
| 206 | extern off_t bb_copyfd_size(int fd1, int fd2, off_t size); | 206 | /* bb_copyfd_XX print read/write errors and return -1 if they occur */ |
| 207 | extern off_t bb_copyfd_eof(int fd1, int fd2); | 207 | extern off_t bb_copyfd_eof(int fd1, int fd2); |
| 208 | extern off_t bb_copyfd_size(int fd1, int fd2, off_t size); | ||
| 209 | extern void bb_copyfd_exact_size(int fd1, int fd2, off_t size); | ||
| 210 | /* "short" copy can be detected by return value < size */ | ||
| 211 | /* this helper yells "short read!" if param is not -1 */ | ||
| 212 | extern void complain_copyfd_and_die(off_t sz) ATTRIBUTE_NORETURN; | ||
| 208 | extern char bb_process_escape_sequence(const char **ptr); | 213 | extern char bb_process_escape_sequence(const char **ptr); |
| 209 | extern char *bb_get_last_path_component(char *path); | 214 | extern char *bb_get_last_path_component(char *path); |
| 210 | extern int ndelay_on(int fd); | 215 | extern int ndelay_on(int fd); |
diff --git a/include/unarchive.h b/include/unarchive.h index 7de6a63fe..88c00882c 100644 --- a/include/unarchive.h +++ b/include/unarchive.h | |||
| @@ -24,7 +24,7 @@ typedef struct file_headers_s { | |||
| 24 | } file_header_t; | 24 | } file_header_t; |
| 25 | 25 | ||
| 26 | typedef struct archive_handle_s { | 26 | typedef struct archive_handle_s { |
| 27 | /* define if the header and data component should processed */ | 27 | /* define if the header and data component should be processed */ |
| 28 | char (*filter)(struct archive_handle_s *); | 28 | char (*filter)(struct archive_handle_s *); |
| 29 | llist_t *accept; | 29 | llist_t *accept; |
| 30 | /* List of files that have been rejected */ | 30 | /* List of files that have been rejected */ |
