diff options
author | Denys Vlasenko <vda.linux@googlemail.com> | 2017-08-08 14:59:35 +0200 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2017-08-08 14:59:35 +0200 |
commit | 00677b5e35dd97f415f0b0bef25b55865f55ab33 (patch) | |
tree | fa4fa2a08cecfa8edafb21d26e07e28b9ca10d74 | |
parent | ddd1ee44436c2ec7e0125ca128c9a148bea8a2c0 (diff) | |
download | busybox-w32-00677b5e35dd97f415f0b0bef25b55865f55ab33.tar.gz busybox-w32-00677b5e35dd97f415f0b0bef25b55865f55ab33.tar.bz2 busybox-w32-00677b5e35dd97f415f0b0bef25b55865f55ab33.zip |
*: fix up use of "getopt_longopts" for longopts not in getopt applet
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
-rw-r--r-- | miscutils/conspy.c | 4 | ||||
-rw-r--r-- | util-linux/flock.c | 4 | ||||
-rw-r--r-- | util-linux/fstrim.c | 4 | ||||
-rw-r--r-- | util-linux/script.c | 4 |
4 files changed, 8 insertions, 8 deletions
diff --git a/miscutils/conspy.c b/miscutils/conspy.c index 47b9e7207..22b29cbf3 100644 --- a/miscutils/conspy.c +++ b/miscutils/conspy.c | |||
@@ -367,7 +367,7 @@ int conspy_main(int argc UNUSED_PARAM, char **argv) | |||
367 | unsigned ttynum; | 367 | unsigned ttynum; |
368 | int poll_timeout_ms; | 368 | int poll_timeout_ms; |
369 | #if ENABLE_LONG_OPTS | 369 | #if ENABLE_LONG_OPTS |
370 | static const char getopt_longopts[] ALIGN1 = | 370 | static const char conspy_longopts[] ALIGN1 = |
371 | "viewonly\0" No_argument "v" | 371 | "viewonly\0" No_argument "v" |
372 | "createdevice\0" No_argument "c" | 372 | "createdevice\0" No_argument "c" |
373 | "neverquit\0" No_argument "Q" | 373 | "neverquit\0" No_argument "Q" |
@@ -378,7 +378,7 @@ int conspy_main(int argc UNUSED_PARAM, char **argv) | |||
378 | "framebuffer\0" No_argument "F" | 378 | "framebuffer\0" No_argument "F" |
379 | ; | 379 | ; |
380 | 380 | ||
381 | applet_long_options = getopt_longopts; | 381 | applet_long_options = conspy_longopts; |
382 | #endif | 382 | #endif |
383 | #define keybuf bb_common_bufsiz1 | 383 | #define keybuf bb_common_bufsiz1 |
384 | setup_common_bufsiz(); | 384 | setup_common_bufsiz(); |
diff --git a/util-linux/flock.c b/util-linux/flock.c index ec35af18f..b55e07adb 100644 --- a/util-linux/flock.c +++ b/util-linux/flock.c | |||
@@ -38,13 +38,13 @@ int flock_main(int argc UNUSED_PARAM, char **argv) | |||
38 | }; | 38 | }; |
39 | 39 | ||
40 | #if ENABLE_LONG_OPTS | 40 | #if ENABLE_LONG_OPTS |
41 | static const char getopt_longopts[] ALIGN1 = | 41 | static const char flock_longopts[] ALIGN1 = |
42 | "shared\0" No_argument "s" | 42 | "shared\0" No_argument "s" |
43 | "exclusive\0" No_argument "x" | 43 | "exclusive\0" No_argument "x" |
44 | "unlock\0" No_argument "u" | 44 | "unlock\0" No_argument "u" |
45 | "nonblock\0" No_argument "n" | 45 | "nonblock\0" No_argument "n" |
46 | ; | 46 | ; |
47 | applet_long_options = getopt_longopts; | 47 | applet_long_options = flock_longopts; |
48 | #endif | 48 | #endif |
49 | opt_complementary = "-1"; | 49 | opt_complementary = "-1"; |
50 | 50 | ||
diff --git a/util-linux/fstrim.c b/util-linux/fstrim.c index 49b3ceb72..1fbf0c857 100644 --- a/util-linux/fstrim.c +++ b/util-linux/fstrim.c | |||
@@ -63,13 +63,13 @@ int fstrim_main(int argc UNUSED_PARAM, char **argv) | |||
63 | }; | 63 | }; |
64 | 64 | ||
65 | #if ENABLE_LONG_OPTS | 65 | #if ENABLE_LONG_OPTS |
66 | static const char getopt_longopts[] ALIGN1 = | 66 | static const char fstrim_longopts[] ALIGN1 = |
67 | "offset\0" Required_argument "o" | 67 | "offset\0" Required_argument "o" |
68 | "length\0" Required_argument "l" | 68 | "length\0" Required_argument "l" |
69 | "minimum\0" Required_argument "m" | 69 | "minimum\0" Required_argument "m" |
70 | "verbose\0" No_argument "v" | 70 | "verbose\0" No_argument "v" |
71 | ; | 71 | ; |
72 | applet_long_options = getopt_longopts; | 72 | applet_long_options = fstrim_longopts; |
73 | #endif | 73 | #endif |
74 | 74 | ||
75 | opt_complementary = "=1"; /* exactly one non-option arg: the mountpoint */ | 75 | opt_complementary = "=1"; /* exactly one non-option arg: the mountpoint */ |
diff --git a/util-linux/script.c b/util-linux/script.c index 89b439163..4cb9842a0 100644 --- a/util-linux/script.c +++ b/util-linux/script.c | |||
@@ -71,7 +71,7 @@ int script_main(int argc UNUSED_PARAM, char **argv) | |||
71 | }; | 71 | }; |
72 | 72 | ||
73 | #if ENABLE_LONG_OPTS | 73 | #if ENABLE_LONG_OPTS |
74 | static const char getopt_longopts[] ALIGN1 = | 74 | static const char script_longopts[] ALIGN1 = |
75 | "append\0" No_argument "a" | 75 | "append\0" No_argument "a" |
76 | "command\0" Required_argument "c" | 76 | "command\0" Required_argument "c" |
77 | "flush\0" No_argument "f" | 77 | "flush\0" No_argument "f" |
@@ -79,7 +79,7 @@ int script_main(int argc UNUSED_PARAM, char **argv) | |||
79 | "timing\0" Optional_argument "t" | 79 | "timing\0" Optional_argument "t" |
80 | ; | 80 | ; |
81 | 81 | ||
82 | applet_long_options = getopt_longopts; | 82 | applet_long_options = script_longopts; |
83 | #endif | 83 | #endif |
84 | 84 | ||
85 | opt_complementary = "?1"; /* max one arg */ | 85 | opt_complementary = "?1"; /* max one arg */ |