diff options
author | Ron Yorston <rmy@pobox.com> | 2016-07-07 14:28:08 +0100 |
---|---|---|
committer | Ron Yorston <rmy@pobox.com> | 2016-07-07 14:58:55 +0100 |
commit | 613f46218c53c8cabdbf0435653e74e0e0e91e1c (patch) | |
tree | ca06a7e7a3e4c861441acb4ea20648d7827fa6ae /miscutils | |
parent | a0c61c9492723dd31681f878f9c68c92817a476d (diff) | |
parent | 237bedd499c58034a1355484d6d4d906f0180308 (diff) | |
download | busybox-w32-613f46218c53c8cabdbf0435653e74e0e0e91e1c.tar.gz busybox-w32-613f46218c53c8cabdbf0435653e74e0e0e91e1c.tar.bz2 busybox-w32-613f46218c53c8cabdbf0435653e74e0e0e91e1c.zip |
Merge branch 'busybox' into merge
Diffstat (limited to 'miscutils')
-rw-r--r-- | miscutils/Kbuild.src | 9 | ||||
-rw-r--r-- | miscutils/conspy.c | 4 | ||||
-rw-r--r-- | miscutils/i2c_tools.c | 2 | ||||
-rw-r--r-- | miscutils/ionice.c | 3 | ||||
-rw-r--r-- | miscutils/microcom.c | 3 | ||||
-rw-r--r-- | miscutils/setsid.c | 2 | ||||
-rw-r--r-- | miscutils/timeout.c | 3 | ||||
-rw-r--r-- | miscutils/ubi_tools.c | 8 |
8 files changed, 18 insertions, 16 deletions
diff --git a/miscutils/Kbuild.src b/miscutils/Kbuild.src index 7b449e6e8..503f54904 100644 --- a/miscutils/Kbuild.src +++ b/miscutils/Kbuild.src | |||
@@ -25,8 +25,13 @@ lib-$(CONFIG_FLASH_UNLOCK) += flash_lock_unlock.o | |||
25 | lib-$(CONFIG_IONICE) += ionice.o | 25 | lib-$(CONFIG_IONICE) += ionice.o |
26 | lib-$(CONFIG_HDPARM) += hdparm.o | 26 | lib-$(CONFIG_HDPARM) += hdparm.o |
27 | lib-$(CONFIG_INOTIFYD) += inotifyd.o | 27 | lib-$(CONFIG_INOTIFYD) += inotifyd.o |
28 | lib-$(CONFIG_FEATURE_LAST_SMALL)+= last.o | 28 | |
29 | lib-$(CONFIG_FEATURE_LAST_FANCY)+= last_fancy.o | 29 | ifeq ($(CONFIG_FEATURE_LAST_FANCY),y) |
30 | lib-$(CONFIG_FEATURE_LAST_FANCY) += last_fancy.o | ||
31 | else | ||
32 | lib-$(CONFIG_LAST) += last.o | ||
33 | endif | ||
34 | |||
30 | lib-$(CONFIG_LESS) += less.o | 35 | lib-$(CONFIG_LESS) += less.o |
31 | lib-$(CONFIG_MAKEDEVS) += makedevs.o | 36 | lib-$(CONFIG_MAKEDEVS) += makedevs.o |
32 | lib-$(CONFIG_MAN) += man.o | 37 | lib-$(CONFIG_MAN) += man.o |
diff --git a/miscutils/conspy.c b/miscutils/conspy.c index f6468c116..e80158e39 100644 --- a/miscutils/conspy.c +++ b/miscutils/conspy.c | |||
@@ -388,8 +388,8 @@ int conspy_main(int argc UNUSED_PARAM, char **argv) | |||
388 | INIT_G(); | 388 | INIT_G(); |
389 | strcpy(G.vcsa_name, DEV_VCSA); | 389 | strcpy(G.vcsa_name, DEV_VCSA); |
390 | 390 | ||
391 | opt_complementary = "x+:y+"; // numeric params | 391 | // numeric params |
392 | opts = getopt32(argv, "vcQsndfFx:y:", &G.x, &G.y); | 392 | opts = getopt32(argv, "vcQsndfFx:+y:+", &G.x, &G.y); |
393 | argv += optind; | 393 | argv += optind; |
394 | ttynum = 0; | 394 | ttynum = 0; |
395 | if (argv[0]) { | 395 | if (argv[0]) { |
diff --git a/miscutils/i2c_tools.c b/miscutils/i2c_tools.c index 57bb72ae7..7731466f7 100644 --- a/miscutils/i2c_tools.c +++ b/miscutils/i2c_tools.c | |||
@@ -908,7 +908,7 @@ int i2cdump_main(int argc UNUSED_PARAM, char **argv) | |||
908 | 908 | ||
909 | int bus_num, bus_addr, mode = I2C_SMBUS_BYTE_DATA, even = 0, pec = 0; | 909 | int bus_num, bus_addr, mode = I2C_SMBUS_BYTE_DATA, even = 0, pec = 0; |
910 | unsigned first = 0x00, last = 0xff, opts; | 910 | unsigned first = 0x00, last = 0xff, opts; |
911 | int *block = (int *)bb_common_bufsiz1; | 911 | int block[I2CDUMP_NUM_REGS]; |
912 | char *opt_r_str, *dash; | 912 | char *opt_r_str, *dash; |
913 | int fd, res; | 913 | int fd, res; |
914 | 914 | ||
diff --git a/miscutils/ionice.c b/miscutils/ionice.c index 0c14256ab..5fcb653a8 100644 --- a/miscutils/ionice.c +++ b/miscutils/ionice.c | |||
@@ -60,9 +60,8 @@ int ionice_main(int argc UNUSED_PARAM, char **argv) | |||
60 | }; | 60 | }; |
61 | 61 | ||
62 | /* Numeric params */ | 62 | /* Numeric params */ |
63 | opt_complementary = "n+:c+:p+"; | ||
64 | /* '+': stop at first non-option */ | 63 | /* '+': stop at first non-option */ |
65 | opt = getopt32(argv, "+n:c:p:", &pri, &ioclass, &pid); | 64 | opt = getopt32(argv, "+n:+c:+p:+", &pri, &ioclass, &pid); |
66 | argv += optind; | 65 | argv += optind; |
67 | 66 | ||
68 | if (opt & OPT_c) { | 67 | if (opt & OPT_c) { |
diff --git a/miscutils/microcom.c b/miscutils/microcom.c index d9e8f9187..dfc9771d8 100644 --- a/miscutils/microcom.c +++ b/miscutils/microcom.c | |||
@@ -64,8 +64,7 @@ int microcom_main(int argc UNUSED_PARAM, char **argv) | |||
64 | unsigned opts; | 64 | unsigned opts; |
65 | 65 | ||
66 | // fetch options | 66 | // fetch options |
67 | opt_complementary = "=1:s+:d+:t+"; // exactly one arg, numeric options | 67 | opts = getopt32(argv, "Xs:+d:+t:+", &speed, &delay, &timeout); |
68 | opts = getopt32(argv, "Xs:d:t:", &speed, &delay, &timeout); | ||
69 | // argc -= optind; | 68 | // argc -= optind; |
70 | argv += optind; | 69 | argv += optind; |
71 | 70 | ||
diff --git a/miscutils/setsid.c b/miscutils/setsid.c index 1b27377b2..9bddc2fcf 100644 --- a/miscutils/setsid.c +++ b/miscutils/setsid.c | |||
@@ -29,7 +29,7 @@ int setsid_main(int argc UNUSED_PARAM, char **argv) | |||
29 | unsigned opt; | 29 | unsigned opt; |
30 | 30 | ||
31 | opt_complementary = "-1"; /* at least one arg */ | 31 | opt_complementary = "-1"; /* at least one arg */ |
32 | opt = getopt32(argv, "c"); | 32 | opt = getopt32(argv, "+c"); /* +: stop on first non-opt */ |
33 | argv += optind; | 33 | argv += optind; |
34 | 34 | ||
35 | /* setsid() is allowed only when we are not a process group leader. | 35 | /* setsid() is allowed only when we are not a process group leader. |
diff --git a/miscutils/timeout.c b/miscutils/timeout.c index 9d56593ba..8df9ff0fd 100644 --- a/miscutils/timeout.c +++ b/miscutils/timeout.c | |||
@@ -52,9 +52,8 @@ int timeout_main(int argc UNUSED_PARAM, char **argv) | |||
52 | /* -p option is not documented, it is needed to support NOMMU. */ | 52 | /* -p option is not documented, it is needed to support NOMMU. */ |
53 | 53 | ||
54 | /* -t SECONDS; -p PARENT_PID */ | 54 | /* -t SECONDS; -p PARENT_PID */ |
55 | opt_complementary = "t+" USE_FOR_NOMMU(":p+"); | ||
56 | /* '+': stop at first non-option */ | 55 | /* '+': stop at first non-option */ |
57 | getopt32(argv, "+s:t:" USE_FOR_NOMMU("p:"), &opt_s, &timeout, &parent); | 56 | getopt32(argv, "+s:t:+" USE_FOR_NOMMU("p:+"), &opt_s, &timeout, &parent); |
58 | /*argv += optind; - no, wait for bb_daemonize_or_rexec! */ | 57 | /*argv += optind; - no, wait for bb_daemonize_or_rexec! */ |
59 | signo = get_signum(opt_s); | 58 | signo = get_signum(opt_s); |
60 | if (signo < 0) | 59 | if (signo < 0) |
diff --git a/miscutils/ubi_tools.c b/miscutils/ubi_tools.c index 4364bc807..8e55e9577 100644 --- a/miscutils/ubi_tools.c +++ b/miscutils/ubi_tools.c | |||
@@ -134,8 +134,8 @@ int ubi_tools_main(int argc UNUSED_PARAM, char **argv) | |||
134 | #define OPTION_a (1 << 5) | 134 | #define OPTION_a (1 << 5) |
135 | #define OPTION_t (1 << 6) | 135 | #define OPTION_t (1 << 6) |
136 | if (do_mkvol) { | 136 | if (do_mkvol) { |
137 | opt_complementary = "-1:d+:n+:a+:O+"; | 137 | opt_complementary = "-1"; |
138 | opts = getopt32(argv, "md:n:N:s:a:t:O:", | 138 | opts = getopt32(argv, "md:+n:+N:s:a:+t:O:+", |
139 | &dev_num, &vol_id, | 139 | &dev_num, &vol_id, |
140 | &vol_name, &size_bytes_str, &alignment, &type, | 140 | &vol_name, &size_bytes_str, &alignment, &type, |
141 | &vid_hdr_offset | 141 | &vid_hdr_offset |
@@ -146,8 +146,8 @@ int ubi_tools_main(int argc UNUSED_PARAM, char **argv) | |||
146 | opts = getopt32(argv, "s:at", &size_bytes_str); | 146 | opts = getopt32(argv, "s:at", &size_bytes_str); |
147 | opts *= OPTION_s; | 147 | opts *= OPTION_s; |
148 | } else { | 148 | } else { |
149 | opt_complementary = "-1:m+:d+:n+:a+"; | 149 | opt_complementary = "-1"; |
150 | opts = getopt32(argv, "m:d:n:N:s:a:t:", | 150 | opts = getopt32(argv, "m:+d:+n:+N:s:a:+t:", |
151 | &mtd_num, &dev_num, &vol_id, | 151 | &mtd_num, &dev_num, &vol_id, |
152 | &vol_name, &size_bytes_str, &alignment, &type | 152 | &vol_name, &size_bytes_str, &alignment, &type |
153 | ); | 153 | ); |