aboutsummaryrefslogtreecommitdiff
path: root/archival
diff options
context:
space:
mode:
authorDenis Vlasenko <vda.linux@googlemail.com>2007-08-18 15:32:12 +0000
committerDenis Vlasenko <vda.linux@googlemail.com>2007-08-18 15:32:12 +0000
commitfe7cd642b0b732f5d41403c2f6983ad676b69dd9 (patch)
treee5962885cb72c976f44b178a350a92ba5f1aa02d /archival
parentd6cd9d7fe9eab19a9e36fdda729c78c40205b1e5 (diff)
downloadbusybox-w32-fe7cd642b0b732f5d41403c2f6983ad676b69dd9.tar.gz
busybox-w32-fe7cd642b0b732f5d41403c2f6983ad676b69dd9.tar.bz2
busybox-w32-fe7cd642b0b732f5d41403c2f6983ad676b69dd9.zip
don't pass argc in getopt32, it's superfluous
(add/remove: 0/0 grow/shrink: 12/131 up/down: 91/-727) Total: -636 bytes text data bss dec hex filename 773469 1058 11092 785619 bfcd3 busybox_old 772644 1058 11092 784794 bf99a busybox_unstripped
Diffstat (limited to 'archival')
-rw-r--r--archival/ar.c2
-rw-r--r--archival/bbunzip.c8
-rw-r--r--archival/cpio.c2
-rw-r--r--archival/dpkg.c2
-rw-r--r--archival/dpkg_deb.c2
-rw-r--r--archival/gzip.c2
-rw-r--r--archival/tar.c2
7 files changed, 10 insertions, 10 deletions
diff --git a/archival/ar.c b/archival/ar.c
index 7b16c2b59..db23c2b73 100644
--- a/archival/ar.c
+++ b/archival/ar.c
@@ -52,7 +52,7 @@ int ar_main(int argc, char **argv)
52 52
53 /* Prepend '-' to the first argument if required */ 53 /* Prepend '-' to the first argument if required */
54 opt_complementary = "--:p:t:x:-1:p--tx:t--px:x--pt"; 54 opt_complementary = "--:p:t:x:-1:p--tx:t--px:x--pt";
55 opt = getopt32(argc, argv, "ptxovcr"); 55 opt = getopt32(argv, "ptxovcr");
56 56
57 if (opt & AR_CTX_PRINT) { 57 if (opt & AR_CTX_PRINT) {
58 archive_handle->action_data = data_extract_to_stdout; 58 archive_handle->action_data = data_extract_to_stdout;
diff --git a/archival/bbunzip.c b/archival/bbunzip.c
index f824fcf67..56c742a49 100644
--- a/archival/bbunzip.c
+++ b/archival/bbunzip.c
@@ -161,7 +161,7 @@ USE_DESKTOP(long long) int unpack_bunzip2(void)
161int bunzip2_main(int argc, char **argv); 161int bunzip2_main(int argc, char **argv);
162int bunzip2_main(int argc, char **argv) 162int bunzip2_main(int argc, char **argv)
163{ 163{
164 getopt32(argc, argv, "cf"); 164 getopt32(argv, "cf");
165 argv += optind; 165 argv += optind;
166 if (applet_name[2] == 'c') 166 if (applet_name[2] == 'c')
167 option_mask32 |= OPT_STDOUT; 167 option_mask32 |= OPT_STDOUT;
@@ -260,7 +260,7 @@ USE_DESKTOP(long long) int unpack_gunzip(void)
260int gunzip_main(int argc, char **argv); 260int gunzip_main(int argc, char **argv);
261int gunzip_main(int argc, char **argv) 261int gunzip_main(int argc, char **argv)
262{ 262{
263 getopt32(argc, argv, "cfvdt"); 263 getopt32(argv, "cfvdt");
264 argv += optind; 264 argv += optind;
265 /* if called as zcat */ 265 /* if called as zcat */
266 if (applet_name[1] == 'c') 266 if (applet_name[1] == 'c')
@@ -298,7 +298,7 @@ USE_DESKTOP(long long) int unpack_unlzma(void)
298int unlzma_main(int argc, char **argv); 298int unlzma_main(int argc, char **argv);
299int unlzma_main(int argc, char **argv) 299int unlzma_main(int argc, char **argv)
300{ 300{
301 getopt32(argc, argv, "c"); 301 getopt32(argv, "c");
302 argv += optind; 302 argv += optind;
303 /* lzmacat? */ 303 /* lzmacat? */
304 if (applet_name[4] == 'c') 304 if (applet_name[4] == 'c')
@@ -340,7 +340,7 @@ USE_DESKTOP(long long) int unpack_uncompress(void)
340int uncompress_main(int argc, char **argv); 340int uncompress_main(int argc, char **argv);
341int uncompress_main(int argc, char **argv) 341int uncompress_main(int argc, char **argv)
342{ 342{
343 getopt32(argc, argv, "cf"); 343 getopt32(argv, "cf");
344 argv += optind; 344 argv += optind;
345 345
346 return bbunpack(argv, make_new_name_uncompress, unpack_uncompress); 346 return bbunpack(argv, make_new_name_uncompress, unpack_uncompress);
diff --git a/archival/cpio.c b/archival/cpio.c
index 72d31c35d..9188e09f1 100644
--- a/archival/cpio.c
+++ b/archival/cpio.c
@@ -35,7 +35,7 @@ int cpio_main(int argc, char **argv)
35 archive_handle->seek = seek_by_read; 35 archive_handle->seek = seek_by_read;
36 archive_handle->flags = ARCHIVE_EXTRACT_NEWER | ARCHIVE_PRESERVE_DATE; 36 archive_handle->flags = ARCHIVE_EXTRACT_NEWER | ARCHIVE_PRESERVE_DATE;
37 37
38 opt = getopt32(argc, argv, "ituvF:dm", &cpio_filename); 38 opt = getopt32(argv, "ituvF:dm", &cpio_filename);
39 39
40 /* One of either extract or test options must be given */ 40 /* One of either extract or test options must be given */
41 if ((opt & (CPIO_OPT_TEST | CPIO_OPT_EXTRACT)) == 0) { 41 if ((opt & (CPIO_OPT_TEST | CPIO_OPT_EXTRACT)) == 0) {
diff --git a/archival/dpkg.c b/archival/dpkg.c
index b5fc06d3d..337576ccd 100644
--- a/archival/dpkg.c
+++ b/archival/dpkg.c
@@ -1579,7 +1579,7 @@ int dpkg_main(int argc, char **argv)
1579 OPT_unpack = 0x40, 1579 OPT_unpack = 0x40,
1580 }; 1580 };
1581 1581
1582 opt = getopt32(argc, argv, "CF:ilPru", &str_f); 1582 opt = getopt32(argv, "CF:ilPru", &str_f);
1583 //if (opt & OPT_configure) ... // -C 1583 //if (opt & OPT_configure) ... // -C
1584 if (opt & OPT_force_ignore_depends) { // -F (--force in official dpkg) 1584 if (opt & OPT_force_ignore_depends) { // -F (--force in official dpkg)
1585 if (strcmp(str_f, "depends")) 1585 if (strcmp(str_f, "depends"))
diff --git a/archival/dpkg_deb.c b/archival/dpkg_deb.c
index 6dd817101..9781b54e5 100644
--- a/archival/dpkg_deb.c
+++ b/archival/dpkg_deb.c
@@ -42,7 +42,7 @@ int dpkg_deb_main(int argc, char **argv)
42#endif 42#endif
43 43
44 opt_complementary = "?c--efXx:e--cfXx:f--ceXx:X--cefx:x--cefX"; 44 opt_complementary = "?c--efXx:e--cfXx:f--ceXx:X--cefx:x--cefX";
45 opt = getopt32(argc, argv, "cefXx"); 45 opt = getopt32(argv, "cefXx");
46 46
47 if (opt & DPKG_DEB_OPT_CONTENTS) { 47 if (opt & DPKG_DEB_OPT_CONTENTS) {
48 tar_archive->action_header = header_verbose_list; 48 tar_archive->action_header = header_verbose_list;
diff --git a/archival/gzip.c b/archival/gzip.c
index 83d78e47c..bda4ae102 100644
--- a/archival/gzip.c
+++ b/archival/gzip.c
@@ -2031,7 +2031,7 @@ int gzip_main(int argc, char **argv)
2031 unsigned opt; 2031 unsigned opt;
2032 2032
2033 /* Must match bbunzip's constants OPT_STDOUT, OPT_FORCE! */ 2033 /* Must match bbunzip's constants OPT_STDOUT, OPT_FORCE! */
2034 opt = getopt32(argc, argv, "cfv" USE_GUNZIP("d") "q123456789" ); 2034 opt = getopt32(argv, "cfv" USE_GUNZIP("d") "q123456789" );
2035 option_mask32 &= 0x7; /* Clear -d, ignore -q, -0..9 */ 2035 option_mask32 &= 0x7; /* Clear -d, ignore -q, -0..9 */
2036 //if (opt & 0x1) // -c 2036 //if (opt & 0x1) // -c
2037 //if (opt & 0x2) // -f 2037 //if (opt & 0x2) // -f
diff --git a/archival/tar.c b/archival/tar.c
index bed8cf24c..9bf9058d8 100644
--- a/archival/tar.c
+++ b/archival/tar.c
@@ -788,7 +788,7 @@ int tar_main(int argc, char **argv)
788#if ENABLE_FEATURE_TAR_LONG_OPTIONS 788#if ENABLE_FEATURE_TAR_LONG_OPTIONS
789 applet_long_options = tar_longopts; 789 applet_long_options = tar_longopts;
790#endif 790#endif
791 opt = getopt32(argc, argv, 791 opt = getopt32(argv,
792 "txC:f:Opvk" 792 "txC:f:Opvk"
793 USE_FEATURE_TAR_CREATE( "ch" ) 793 USE_FEATURE_TAR_CREATE( "ch" )
794 USE_FEATURE_TAR_BZIP2( "j" ) 794 USE_FEATURE_TAR_BZIP2( "j" )