diff options
author | Denis Vlasenko <vda.linux@googlemail.com> | 2008-11-01 12:54:56 +0000 |
---|---|---|
committer | Denis Vlasenko <vda.linux@googlemail.com> | 2008-11-01 12:54:56 +0000 |
commit | 1a9e9bdd93b06508b70bd29ef5eeb82f91d86222 (patch) | |
tree | adcf234f48d8a68a5644f1504cc93025d58ce2a2 /include | |
parent | 5a89763fb7e57d4fc3d393eafa35c58f8285a083 (diff) | |
download | busybox-w32-1a9e9bdd93b06508b70bd29ef5eeb82f91d86222.tar.gz busybox-w32-1a9e9bdd93b06508b70bd29ef5eeb82f91d86222.tar.bz2 busybox-w32-1a9e9bdd93b06508b70bd29ef5eeb82f91d86222.zip |
gunzip: restore mtime. approx +80 bytes of code
rpm: make code more robust
lsmod: small code shrink
Diffstat (limited to 'include')
-rw-r--r-- | include/libbb.h | 5 | ||||
-rw-r--r-- | include/unarchive.h | 11 |
2 files changed, 12 insertions, 4 deletions
diff --git a/include/libbb.h b/include/libbb.h index 2a8b18336..5b6a2dae1 100644 --- a/include/libbb.h +++ b/include/libbb.h | |||
@@ -912,10 +912,7 @@ int chown_main(int argc, char **argv) USE_CHOWN(MAIN_EXTERNALLY_VISIBLE); | |||
912 | /* Don't need USE_xxx() guard for these */ | 912 | /* Don't need USE_xxx() guard for these */ |
913 | int gunzip_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; | 913 | int gunzip_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; |
914 | int bunzip2_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; | 914 | int bunzip2_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; |
915 | int bbunpack(char **argv, | 915 | |
916 | char* (*make_new_name)(char *filename), | ||
917 | USE_DESKTOP(long long) int (*unpacker)(void) | ||
918 | ) FAST_FUNC; | ||
919 | #if ENABLE_ROUTE | 916 | #if ENABLE_ROUTE |
920 | void bb_displayroutes(int noresolve, int netstatfmt) FAST_FUNC; | 917 | void bb_displayroutes(int noresolve, int netstatfmt) FAST_FUNC; |
921 | #endif | 918 | #endif |
diff --git a/include/unarchive.h b/include/unarchive.h index 7ff791be5..9077130a5 100644 --- a/include/unarchive.h +++ b/include/unarchive.h | |||
@@ -77,6 +77,12 @@ typedef struct archive_handle_t { | |||
77 | } archive_handle_t; | 77 | } archive_handle_t; |
78 | 78 | ||
79 | 79 | ||
80 | /* Info struct unpackers can fill out to inform users of thing like | ||
81 | * timestamps of unpacked files */ | ||
82 | typedef struct unpack_info_t { | ||
83 | time_t mtime; | ||
84 | } unpack_info_t; | ||
85 | |||
80 | extern archive_handle_t *init_handle(void) FAST_FUNC; | 86 | extern archive_handle_t *init_handle(void) FAST_FUNC; |
81 | 87 | ||
82 | extern char filter_accept_all(archive_handle_t *archive_handle) FAST_FUNC; | 88 | extern char filter_accept_all(archive_handle_t *archive_handle) FAST_FUNC; |
@@ -126,10 +132,15 @@ USE_DESKTOP(long long) int unpack_lzma_stream(int src_fd, int dst_fd) FAST_FUNC; | |||
126 | /* the rest wants 2 first bytes already skipped by the caller */ | 132 | /* the rest wants 2 first bytes already skipped by the caller */ |
127 | USE_DESKTOP(long long) int unpack_bz2_stream(int src_fd, int dst_fd) FAST_FUNC; | 133 | USE_DESKTOP(long long) int unpack_bz2_stream(int src_fd, int dst_fd) FAST_FUNC; |
128 | USE_DESKTOP(long long) int unpack_gz_stream(int src_fd, int dst_fd) FAST_FUNC; | 134 | USE_DESKTOP(long long) int unpack_gz_stream(int src_fd, int dst_fd) FAST_FUNC; |
135 | USE_DESKTOP(long long) int unpack_gz_stream_with_info(int src_fd, int dst_fd, unpack_info_t *info) FAST_FUNC; | ||
129 | USE_DESKTOP(long long) int unpack_Z_stream(int fd_in, int fd_out) FAST_FUNC; | 136 | USE_DESKTOP(long long) int unpack_Z_stream(int fd_in, int fd_out) FAST_FUNC; |
130 | /* wrapper which checks first two bytes to be "BZ" */ | 137 | /* wrapper which checks first two bytes to be "BZ" */ |
131 | USE_DESKTOP(long long) int unpack_bz2_stream_prime(int src_fd, int dst_fd) FAST_FUNC; | 138 | USE_DESKTOP(long long) int unpack_bz2_stream_prime(int src_fd, int dst_fd) FAST_FUNC; |
132 | 139 | ||
140 | int bbunpack(char **argv, | ||
141 | char* (*make_new_name)(char *filename), | ||
142 | USE_DESKTOP(long long) int (*unpacker)(unpack_info_t *info)) FAST_FUNC; | ||
143 | |||
133 | #if BB_MMU | 144 | #if BB_MMU |
134 | void open_transformer(int fd, | 145 | void open_transformer(int fd, |
135 | USE_DESKTOP(long long) int FAST_FUNC (*transformer)(int src_fd, int dst_fd)) FAST_FUNC; | 146 | USE_DESKTOP(long long) int FAST_FUNC (*transformer)(int src_fd, int dst_fd)) FAST_FUNC; |