diff options
author | Glenn L McGrath <bug1@ihug.co.nz> | 2001-01-02 23:41:50 +0000 |
---|---|---|
committer | Glenn L McGrath <bug1@ihug.co.nz> | 2001-01-02 23:41:50 +0000 |
commit | 7541e3a812b0d6190b63bcc8327526d9cbef68e2 (patch) | |
tree | 7f2b94c79f12b1a8d8f184fbc9568f84d2be66cf | |
parent | 004827d71597b49c9c2eaac2654edc114981367c (diff) | |
download | busybox-w32-7541e3a812b0d6190b63bcc8327526d9cbef68e2.tar.gz busybox-w32-7541e3a812b0d6190b63bcc8327526d9cbef68e2.tar.bz2 busybox-w32-7541e3a812b0d6190b63bcc8327526d9cbef68e2.zip |
add dpkg-deb command
-rw-r--r-- | Changelog | 3 | ||||
-rw-r--r-- | Config.h | 13 | ||||
-rw-r--r-- | applets.h | 3 | ||||
-rw-r--r-- | applets/usage.c | 14 | ||||
-rw-r--r-- | ar.c | 2 | ||||
-rw-r--r-- | archival/ar.c | 2 | ||||
-rw-r--r-- | archival/tar.c | 4 | ||||
-rw-r--r-- | include/applets.h | 3 | ||||
-rw-r--r-- | tar.c | 4 | ||||
-rw-r--r-- | usage.c | 14 |
10 files changed, 55 insertions, 7 deletions
@@ -1,5 +1,6 @@ | |||
1 | 0.49pre | 1 | 0.49pre |
2 | 2 | ||
3 | * Glenn McGrath -- new 'dpkg-deb' command | ||
3 | * me -- md5sum was broken. Now fixed. | 4 | * me -- md5sum was broken. Now fixed. |
4 | * Matt Kraai -- new sort.c | 5 | * Matt Kraai -- new sort.c |
5 | 6 | ||
@@ -25,6 +25,7 @@ | |||
25 | #define BB_DIRNAME | 25 | #define BB_DIRNAME |
26 | #define BB_DMESG | 26 | #define BB_DMESG |
27 | #define BB_DOS2UNIX | 27 | #define BB_DOS2UNIX |
28 | #define BB_DPKG_DEB | ||
28 | #define BB_DUTMP | 29 | #define BB_DUTMP |
29 | #define BB_DU | 30 | #define BB_DU |
30 | #define BB_DUMPKMAP | 31 | #define BB_DUMPKMAP |
@@ -327,6 +328,18 @@ | |||
327 | #endif | 328 | #endif |
328 | #endif | 329 | #endif |
329 | // | 330 | // |
331 | #ifdef BB_DPKG_DEB | ||
332 | #ifndef BB_AR | ||
333 | #define BB_AR | ||
334 | #endif | ||
335 | #ifndef BB_TAR | ||
336 | #define BB_TAR | ||
337 | #endif | ||
338 | #ifndef BB_FEATURE_TAR_GZIP | ||
339 | #define BB_FEATURE_TAR_GZIP | ||
340 | #endif | ||
341 | #endif | ||
342 | // | ||
330 | #ifdef BB_TAR | 343 | #ifdef BB_TAR |
331 | #ifdef BB_FEATURE_TAR_GZIP | 344 | #ifdef BB_FEATURE_TAR_GZIP |
332 | #ifndef BB_GUNZIP | 345 | #ifndef BB_GUNZIP |
@@ -89,6 +89,9 @@ const struct BB_applet applets[] = { | |||
89 | #ifdef BB_DOS2UNIX | 89 | #ifdef BB_DOS2UNIX |
90 | APPLET("dos2unix", dos2unix_main, _BB_DIR_USR_BIN, dos2unix_usage) | 90 | APPLET("dos2unix", dos2unix_main, _BB_DIR_USR_BIN, dos2unix_usage) |
91 | #endif | 91 | #endif |
92 | #ifdef BB_DPKG_DEB | ||
93 | APPLET("dpkg-deb", dpkg_deb_main, _BB_DIR_USR_BIN, dpkg_deb_usage) | ||
94 | #endif | ||
92 | #ifdef BB_DU | 95 | #ifdef BB_DU |
93 | APPLET("du", du_main, _BB_DIR_USR_BIN, du_usage) | 96 | APPLET("du", du_main, _BB_DIR_USR_BIN, du_usage) |
94 | #endif | 97 | #endif |
diff --git a/applets/usage.c b/applets/usage.c index b904e0c7c..e92b87a9c 100644 --- a/applets/usage.c +++ b/applets/usage.c | |||
@@ -228,6 +228,20 @@ const char dos2unix_usage[] = | |||
228 | ; | 228 | ; |
229 | #endif | 229 | #endif |
230 | 230 | ||
231 | #if defined BB_DPKG_DEB | ||
232 | const char dpkg_deb_usage[] = | ||
233 | "dpkg-deb [-cexX] file directory" | ||
234 | #ifndef BB_FEATURE_TRIVIAL_HELP | ||
235 | "Perform actions on debian packages (.debs)\n" | ||
236 | "Options:\n" | ||
237 | "\t-c\tList contents of filesystem tree\n" | ||
238 | "\t-e\tExtract control files to directory\n" | ||
239 | "\t-x\tExctract packages filesystem tree to directory\n" | ||
240 | "\t-X\tVerbose extract\n" | ||
241 | #endif | ||
242 | ; | ||
243 | #endif | ||
244 | |||
231 | #if defined BB_DU | 245 | #if defined BB_DU |
232 | const char du_usage[] = | 246 | const char du_usage[] = |
233 | "du [OPTION]... [FILE]...\n" | 247 | "du [OPTION]... [FILE]...\n" |
@@ -39,7 +39,7 @@ typedef struct ar_headers_s { | |||
39 | /* | 39 | /* |
40 | * return the headerL_t struct for the filename descriptor | 40 | * return the headerL_t struct for the filename descriptor |
41 | */ | 41 | */ |
42 | static ar_headers_t get_headers(int srcFd) | 42 | extern ar_headers_t get_headers(int srcFd) |
43 | { | 43 | { |
44 | typedef struct raw_ar_header_s { /* Byte Offset */ | 44 | typedef struct raw_ar_header_s { /* Byte Offset */ |
45 | char name[16]; /* 0-15 */ | 45 | char name[16]; /* 0-15 */ |
diff --git a/archival/ar.c b/archival/ar.c index bd54bb6b8..596574e6a 100644 --- a/archival/ar.c +++ b/archival/ar.c | |||
@@ -39,7 +39,7 @@ typedef struct ar_headers_s { | |||
39 | /* | 39 | /* |
40 | * return the headerL_t struct for the filename descriptor | 40 | * return the headerL_t struct for the filename descriptor |
41 | */ | 41 | */ |
42 | static ar_headers_t get_headers(int srcFd) | 42 | extern ar_headers_t get_headers(int srcFd) |
43 | { | 43 | { |
44 | typedef struct raw_ar_header_s { /* Byte Offset */ | 44 | typedef struct raw_ar_header_s { /* Byte Offset */ |
45 | char name[16]; /* 0-15 */ | 45 | char name[16]; /* 0-15 */ |
diff --git a/archival/tar.c b/archival/tar.c index 04e351e37..4971e4775 100644 --- a/archival/tar.c +++ b/archival/tar.c | |||
@@ -134,7 +134,7 @@ struct TarInfo | |||
134 | typedef struct TarInfo TarInfo; | 134 | typedef struct TarInfo TarInfo; |
135 | 135 | ||
136 | /* Local procedures to restore files from a tar file. */ | 136 | /* Local procedures to restore files from a tar file. */ |
137 | static int readTarFile(int tarFd, int extractFlag, int listFlag, | 137 | extern int readTarFile(int tarFd, int extractFlag, int listFlag, |
138 | int tostdoutFlag, int verboseFlag, char** extractList, | 138 | int tostdoutFlag, int verboseFlag, char** extractList, |
139 | char** excludeList); | 139 | char** excludeList); |
140 | 140 | ||
@@ -153,7 +153,7 @@ void child_died() | |||
153 | exit(EXIT_FAILURE); | 153 | exit(EXIT_FAILURE); |
154 | } | 154 | } |
155 | 155 | ||
156 | static int tar_unzip_init(int tarFd) | 156 | extern int tar_unzip_init(int tarFd) |
157 | { | 157 | { |
158 | int child_pid; | 158 | int child_pid; |
159 | static int unzip_pipe[2]; | 159 | static int unzip_pipe[2]; |
diff --git a/include/applets.h b/include/applets.h index fe8c59782..4837cb564 100644 --- a/include/applets.h +++ b/include/applets.h | |||
@@ -89,6 +89,9 @@ const struct BB_applet applets[] = { | |||
89 | #ifdef BB_DOS2UNIX | 89 | #ifdef BB_DOS2UNIX |
90 | APPLET("dos2unix", dos2unix_main, _BB_DIR_USR_BIN, dos2unix_usage) | 90 | APPLET("dos2unix", dos2unix_main, _BB_DIR_USR_BIN, dos2unix_usage) |
91 | #endif | 91 | #endif |
92 | #ifdef BB_DPKG_DEB | ||
93 | APPLET("dpkg-deb", dpkg_deb_main, _BB_DIR_USR_BIN, dpkg_deb_usage) | ||
94 | #endif | ||
92 | #ifdef BB_DU | 95 | #ifdef BB_DU |
93 | APPLET("du", du_main, _BB_DIR_USR_BIN, du_usage) | 96 | APPLET("du", du_main, _BB_DIR_USR_BIN, du_usage) |
94 | #endif | 97 | #endif |
@@ -134,7 +134,7 @@ struct TarInfo | |||
134 | typedef struct TarInfo TarInfo; | 134 | typedef struct TarInfo TarInfo; |
135 | 135 | ||
136 | /* Local procedures to restore files from a tar file. */ | 136 | /* Local procedures to restore files from a tar file. */ |
137 | static int readTarFile(int tarFd, int extractFlag, int listFlag, | 137 | extern int readTarFile(int tarFd, int extractFlag, int listFlag, |
138 | int tostdoutFlag, int verboseFlag, char** extractList, | 138 | int tostdoutFlag, int verboseFlag, char** extractList, |
139 | char** excludeList); | 139 | char** excludeList); |
140 | 140 | ||
@@ -153,7 +153,7 @@ void child_died() | |||
153 | exit(EXIT_FAILURE); | 153 | exit(EXIT_FAILURE); |
154 | } | 154 | } |
155 | 155 | ||
156 | static int tar_unzip_init(int tarFd) | 156 | extern int tar_unzip_init(int tarFd) |
157 | { | 157 | { |
158 | int child_pid; | 158 | int child_pid; |
159 | static int unzip_pipe[2]; | 159 | static int unzip_pipe[2]; |
@@ -228,6 +228,20 @@ const char dos2unix_usage[] = | |||
228 | ; | 228 | ; |
229 | #endif | 229 | #endif |
230 | 230 | ||
231 | #if defined BB_DPKG_DEB | ||
232 | const char dpkg_deb_usage[] = | ||
233 | "dpkg-deb [-cexX] file directory" | ||
234 | #ifndef BB_FEATURE_TRIVIAL_HELP | ||
235 | "Perform actions on debian packages (.debs)\n" | ||
236 | "Options:\n" | ||
237 | "\t-c\tList contents of filesystem tree\n" | ||
238 | "\t-e\tExtract control files to directory\n" | ||
239 | "\t-x\tExctract packages filesystem tree to directory\n" | ||
240 | "\t-X\tVerbose extract\n" | ||
241 | #endif | ||
242 | ; | ||
243 | #endif | ||
244 | |||
231 | #if defined BB_DU | 245 | #if defined BB_DU |
232 | const char du_usage[] = | 246 | const char du_usage[] = |
233 | "du [OPTION]... [FILE]...\n" | 247 | "du [OPTION]... [FILE]...\n" |