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-fe7cd642b0b732f5d41403c2f6983ad676b69dd9.tar.gz
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);
int dmesg_main(int argc, char **argv)
{
char *size, *level;
- int flags = getopt32(argc, argv, "cs:n:", &size, &level);
+ int flags = getopt32(argv, "cs:n:", &size, &level);
if (flags & 4) {
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)
if (argc < 2) {
bb_show_usage();
}
- verify = !getopt32(argc, argv, "n");
+ verify = !getopt32(argv, "n");
argv += optind;
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)
PTR_TO_GLOBALS = xzalloc(sizeof(G));
- opt = getopt32(argc, argv, "b:C:H:lS:u" USE_FEATURE_FDISK_BLKSIZE("s"),
+ opt = getopt32(argv, "b:C:H:lS:u" USE_FEATURE_FDISK_BLKSIZE("s"),
&str_b, &str_C, &str_H, &str_S);
argc -= optind;
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[])
}
#if !ENABLE_GETOPT_LONG
- opt = getopt32(argc, argv, "+o:n:qQs:Tu", &optstr, &name, &s_arg);
+ opt = getopt32(argv, "+o:n:qQs:Tu", &optstr, &name, &s_arg);
#else
applet_long_options = getopt_longopts;
opt_complementary = "l::";
- opt = getopt32(argc, argv, "+o:n:qQs:Tual:",
+ opt = getopt32(argv, "+o:n:qQs:Tual:",
&optstr, &name, &s_arg, &l_arg);
/* Effectuate the read options for the applet itself */
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)
applet_long_options = hwclock_longopts;
#endif
opt_complementary = "r--ws:w--rs:s--wr:l--u:u--l";
- opt = getopt32(argc, argv, "lurswf:", &rtcname);
+ opt = getopt32(argv, "lurswf:", &rtcname);
/* If -u or -l wasn't given check if we are using utc */
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)
#define flag_sem (1<<2)
#define flag_shm (1<<3)
- opt = getopt32(argc, argv, "i:aqsmtcplu", &opt_i);
+ opt = getopt32(argv, "i:aqsmtcplu", &opt_i);
if (opt & 0x1) { // -i
id = xatoi(opt_i);
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)
char *opt_o;
unsigned long long offset = 0;
- opt = getopt32(argc, argv, "do:", &opt_o);
+ opt = getopt32(argv, "do:", &opt_o);
argc -= optind;
argv += optind;
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)
bb_error_msg_and_die("bad inode size");
#endif
- opt = getopt32(argc, argv, "ci:l:n:v", &str_i, &listfile, &str_n);
+ opt = getopt32(argv, "ci:l:n:v", &str_i, &listfile, &str_n);
argv += optind;
//if (opt & 1) -c
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)
// Parse remaining options
- opt = getopt32(argc, argv, "o:t:rwanfvs", &opt_o, &fstype);
+ opt = getopt32(argv, "o:t:rwanfvs", &opt_o, &fstype);
if (opt & 0x1) append_mount_options(&cmdopts, opt_o); // -o
//if (opt & 0x2) // -t
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)
unsigned long flags;
opt_complementary = "-1";
- flags = getopt32(argc, argv, "sp");
+ flags = getopt32(argv, "sp");
remote_time = askremotedate(argv[optind]);
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)
mapFile = defaultmap;
opt_complementary = "nn:aa:bb:ss:ii:rr:vv";
- getopt32(argc, argv, "M:m:p:nabsirv",
+ getopt32(argv, "M:m:p:nabsirv",
&mult, &mapFile, &proFile,
&optNative, &optAll, &optBins, &optSub,
&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)
if (argc == 1)
bb_show_usage();
- ret = getopt32(argc, argv, "a");
+ ret = getopt32(argv, "a");
if (ret)
return do_em_all();
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)
// Parse args (-c console)
opt_complementary = "-2";
- getopt32(argc, argv, "c:", &console);
+ getopt32(argv, "c:", &console);
argv += optind;
// 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)
/* Parse any options */
- opt = getopt32(argc, argv, OPTION_STRING, &fstype);
+ opt = getopt32(argv, OPTION_STRING, &fstype);
argc -= optind;
argv += optind;