aboutsummaryrefslogtreecommitdiff
path: root/util-linux
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 /util-linux
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 'util-linux')
-rw-r--r--util-linux/dmesg.c2
-rw-r--r--util-linux/fdformat.c2
-rw-r--r--util-linux/fdisk.c2
-rw-r--r--util-linux/getopt.c4
-rw-r--r--util-linux/hwclock.c2
-rw-r--r--util-linux/ipcs.c2
-rw-r--r--util-linux/losetup.c2
-rw-r--r--util-linux/mkfs_minix.c2
-rw-r--r--util-linux/mount.c2
-rw-r--r--util-linux/rdate.c2
-rw-r--r--util-linux/readprofile.c2
-rw-r--r--util-linux/swaponoff.c2
-rw-r--r--util-linux/switch_root.c2
-rw-r--r--util-linux/umount.c2
14 files changed, 15 insertions, 15 deletions
diff --git a/util-linux/dmesg.c b/util-linux/dmesg.c
index 0c1c6fabb..909cbd24e 100644
--- a/util-linux/dmesg.c
+++ b/util-linux/dmesg.c
@@ -16,7 +16,7 @@ int dmesg_main(int argc, char **argv);
16int dmesg_main(int argc, char **argv) 16int dmesg_main(int argc, char **argv)
17{ 17{
18 char *size, *level; 18 char *size, *level;
19 int flags = getopt32(argc, argv, "cs:n:", &size, &level); 19 int flags = getopt32(argv, "cs:n:", &size, &level);
20 20
21 if (flags & 4) { 21 if (flags & 4) {
22 if (klogctl(8, NULL, xatoul_range(level, 0, 10))) 22 if (klogctl(8, NULL, xatoul_range(level, 0, 10)))
diff --git a/util-linux/fdformat.c b/util-linux/fdformat.c
index 5e253efa8..dc45e23c0 100644
--- a/util-linux/fdformat.c
+++ b/util-linux/fdformat.c
@@ -57,7 +57,7 @@ int fdformat_main(int argc,char **argv)
57 if (argc < 2) { 57 if (argc < 2) {
58 bb_show_usage(); 58 bb_show_usage();
59 } 59 }
60 verify = !getopt32(argc, argv, "n"); 60 verify = !getopt32(argv, "n");
61 argv += optind; 61 argv += optind;
62 62
63 xstat(*argv, &st); 63 xstat(*argv, &st);
diff --git a/util-linux/fdisk.c b/util-linux/fdisk.c
index 2933db472..2a91a8f2f 100644
--- a/util-linux/fdisk.c
+++ b/util-linux/fdisk.c
@@ -2752,7 +2752,7 @@ int fdisk_main(int argc, char **argv)
2752 2752
2753 PTR_TO_GLOBALS = xzalloc(sizeof(G)); 2753 PTR_TO_GLOBALS = xzalloc(sizeof(G));
2754 2754
2755 opt = getopt32(argc, argv, "b:C:H:lS:u" USE_FEATURE_FDISK_BLKSIZE("s"), 2755 opt = getopt32(argv, "b:C:H:lS:u" USE_FEATURE_FDISK_BLKSIZE("s"),
2756 &str_b, &str_C, &str_H, &str_S); 2756 &str_b, &str_C, &str_H, &str_S);
2757 argc -= optind; 2757 argc -= optind;
2758 argv += optind; 2758 argv += optind;
diff --git a/util-linux/getopt.c b/util-linux/getopt.c
index 246017036..94fb45761 100644
--- a/util-linux/getopt.c
+++ b/util-linux/getopt.c
@@ -314,11 +314,11 @@ int getopt_main(int argc, char *argv[])
314 } 314 }
315 315
316#if !ENABLE_GETOPT_LONG 316#if !ENABLE_GETOPT_LONG
317 opt = getopt32(argc, argv, "+o:n:qQs:Tu", &optstr, &name, &s_arg); 317 opt = getopt32(argv, "+o:n:qQs:Tu", &optstr, &name, &s_arg);
318#else 318#else
319 applet_long_options = getopt_longopts; 319 applet_long_options = getopt_longopts;
320 opt_complementary = "l::"; 320 opt_complementary = "l::";
321 opt = getopt32(argc, argv, "+o:n:qQs:Tual:", 321 opt = getopt32(argv, "+o:n:qQs:Tual:",
322 &optstr, &name, &s_arg, &l_arg); 322 &optstr, &name, &s_arg, &l_arg);
323 /* Effectuate the read options for the applet itself */ 323 /* Effectuate the read options for the applet itself */
324 while (l_arg) { 324 while (l_arg) {
diff --git a/util-linux/hwclock.c b/util-linux/hwclock.c
index fcb7308fe..09b09eb6f 100644
--- a/util-linux/hwclock.c
+++ b/util-linux/hwclock.c
@@ -189,7 +189,7 @@ int hwclock_main(int argc, char **argv)
189 applet_long_options = hwclock_longopts; 189 applet_long_options = hwclock_longopts;
190#endif 190#endif
191 opt_complementary = "r--ws:w--rs:s--wr:l--u:u--l"; 191 opt_complementary = "r--ws:w--rs:s--wr:l--u:u--l";
192 opt = getopt32(argc, argv, "lurswf:", &rtcname); 192 opt = getopt32(argv, "lurswf:", &rtcname);
193 193
194 /* If -u or -l wasn't given check if we are using utc */ 194 /* If -u or -l wasn't given check if we are using utc */
195 if (opt & (HWCLOCK_OPT_UTC | HWCLOCK_OPT_LOCALTIME)) 195 if (opt & (HWCLOCK_OPT_UTC | HWCLOCK_OPT_LOCALTIME))
diff --git a/util-linux/ipcs.c b/util-linux/ipcs.c
index d7d901921..e11c2de04 100644
--- a/util-linux/ipcs.c
+++ b/util-linux/ipcs.c
@@ -574,7 +574,7 @@ int ipcs_main(int argc, char **argv)
574#define flag_sem (1<<2) 574#define flag_sem (1<<2)
575#define flag_shm (1<<3) 575#define flag_shm (1<<3)
576 576
577 opt = getopt32(argc, argv, "i:aqsmtcplu", &opt_i); 577 opt = getopt32(argv, "i:aqsmtcplu", &opt_i);
578 if (opt & 0x1) { // -i 578 if (opt & 0x1) { // -i
579 id = xatoi(opt_i); 579 id = xatoi(opt_i);
580 flags |= flag_print; 580 flags |= flag_print;
diff --git a/util-linux/losetup.c b/util-linux/losetup.c
index e2d4e4d79..9409cdff5 100644
--- a/util-linux/losetup.c
+++ b/util-linux/losetup.c
@@ -18,7 +18,7 @@ int losetup_main(int argc, char **argv)
18 char *opt_o; 18 char *opt_o;
19 unsigned long long offset = 0; 19 unsigned long long offset = 0;
20 20
21 opt = getopt32(argc, argv, "do:", &opt_o); 21 opt = getopt32(argv, "do:", &opt_o);
22 argc -= optind; 22 argc -= optind;
23 argv += optind; 23 argv += optind;
24 24
diff --git a/util-linux/mkfs_minix.c b/util-linux/mkfs_minix.c
index 34a4a91ab..2b0697ae5 100644
--- a/util-linux/mkfs_minix.c
+++ b/util-linux/mkfs_minix.c
@@ -626,7 +626,7 @@ int mkfs_minix_main(int argc, char **argv)
626 bb_error_msg_and_die("bad inode size"); 626 bb_error_msg_and_die("bad inode size");
627#endif 627#endif
628 628
629 opt = getopt32(argc, argv, "ci:l:n:v", &str_i, &listfile, &str_n); 629 opt = getopt32(argv, "ci:l:n:v", &str_i, &listfile, &str_n);
630 argv += optind; 630 argv += optind;
631 //if (opt & 1) -c 631 //if (opt & 1) -c
632 if (opt & 2) G.req_nr_inodes = xatoul(str_i); // -i 632 if (opt & 2) G.req_nr_inodes = xatoul(str_i); // -i
diff --git a/util-linux/mount.c b/util-linux/mount.c
index bd7ecc258..e9bf2a8d3 100644
--- a/util-linux/mount.c
+++ b/util-linux/mount.c
@@ -1554,7 +1554,7 @@ int mount_main(int argc, char **argv)
1554 1554
1555 // Parse remaining options 1555 // Parse remaining options
1556 1556
1557 opt = getopt32(argc, argv, "o:t:rwanfvs", &opt_o, &fstype); 1557 opt = getopt32(argv, "o:t:rwanfvs", &opt_o, &fstype);
1558 if (opt & 0x1) append_mount_options(&cmdopts, opt_o); // -o 1558 if (opt & 0x1) append_mount_options(&cmdopts, opt_o); // -o
1559 //if (opt & 0x2) // -t 1559 //if (opt & 0x2) // -t
1560 if (opt & 0x4) append_mount_options(&cmdopts, "ro"); // -r 1560 if (opt & 0x4) append_mount_options(&cmdopts, "ro"); // -r
diff --git a/util-linux/rdate.c b/util-linux/rdate.c
index 9166546ae..4387f04de 100644
--- a/util-linux/rdate.c
+++ b/util-linux/rdate.c
@@ -49,7 +49,7 @@ int rdate_main(int argc, char **argv)
49 unsigned long flags; 49 unsigned long flags;
50 50
51 opt_complementary = "-1"; 51 opt_complementary = "-1";
52 flags = getopt32(argc, argv, "sp"); 52 flags = getopt32(argv, "sp");
53 53
54 remote_time = askremotedate(argv[optind]); 54 remote_time = askremotedate(argv[optind]);
55 55
diff --git a/util-linux/readprofile.c b/util-linux/readprofile.c
index 347621c19..152137654 100644
--- a/util-linux/readprofile.c
+++ b/util-linux/readprofile.c
@@ -67,7 +67,7 @@ int readprofile_main(int argc, char **argv)
67 mapFile = defaultmap; 67 mapFile = defaultmap;
68 68
69 opt_complementary = "nn:aa:bb:ss:ii:rr:vv"; 69 opt_complementary = "nn:aa:bb:ss:ii:rr:vv";
70 getopt32(argc, argv, "M:m:p:nabsirv", 70 getopt32(argv, "M:m:p:nabsirv",
71 &mult, &mapFile, &proFile, 71 &mult, &mapFile, &proFile,
72 &optNative, &optAll, &optBins, &optSub, 72 &optNative, &optAll, &optBins, &optSub,
73 &optInfo, &optReset, &optVerbose); 73 &optInfo, &optReset, &optVerbose);
diff --git a/util-linux/swaponoff.c b/util-linux/swaponoff.c
index cb1bbe940..73fe105a9 100644
--- a/util-linux/swaponoff.c
+++ b/util-linux/swaponoff.c
@@ -66,7 +66,7 @@ int swap_on_off_main(int argc, char **argv)
66 if (argc == 1) 66 if (argc == 1)
67 bb_show_usage(); 67 bb_show_usage();
68 68
69 ret = getopt32(argc, argv, "a"); 69 ret = getopt32(argv, "a");
70 if (ret) 70 if (ret)
71 return do_em_all(); 71 return do_em_all();
72 72
diff --git a/util-linux/switch_root.c b/util-linux/switch_root.c
index 72a2f46c1..e4e9e21ad 100644
--- a/util-linux/switch_root.c
+++ b/util-linux/switch_root.c
@@ -74,7 +74,7 @@ int switch_root_main(int argc, char **argv)
74 // Parse args (-c console) 74 // Parse args (-c console)
75 75
76 opt_complementary = "-2"; 76 opt_complementary = "-2";
77 getopt32(argc, argv, "c:", &console); 77 getopt32(argv, "c:", &console);
78 argv += optind; 78 argv += optind;
79 79
80 // Change to new root directory and verify it's a different fs. 80 // Change to new root directory and verify it's a different fs.
diff --git a/util-linux/umount.c b/util-linux/umount.c
index 7063a474d..16d3dfb82 100644
--- a/util-linux/umount.c
+++ b/util-linux/umount.c
@@ -38,7 +38,7 @@ int umount_main(int argc, char **argv)
38 38
39 /* Parse any options */ 39 /* Parse any options */
40 40
41 opt = getopt32(argc, argv, OPTION_STRING, &fstype); 41 opt = getopt32(argv, OPTION_STRING, &fstype);
42 42
43 argc -= optind; 43 argc -= optind;
44 argv += optind; 44 argv += optind;