*: fix up use of "getopt_longopts" for longopts not in getopt applet
authorDenys Vlasenko <vda.linux@googlemail.com>
Tue, 8 Aug 2017 12:59:35 +0000 (14:59 +0200)
committerDenys Vlasenko <vda.linux@googlemail.com>
Tue, 8 Aug 2017 12:59:35 +0000 (14:59 +0200)
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
miscutils/conspy.c
util-linux/flock.c
util-linux/fstrim.c
util-linux/script.c

index 47b9e72079554bb38c62ff0a3ccb05b27e502b5c..22b29cbf34c025e045a15f1931b71c7a7a07f2c7 100644 (file)
@@ -367,7 +367,7 @@ int conspy_main(int argc UNUSED_PARAM, char **argv)
        unsigned ttynum;
        int poll_timeout_ms;
 #if ENABLE_LONG_OPTS
-       static const char getopt_longopts[] ALIGN1 =
+       static const char conspy_longopts[] ALIGN1 =
                "viewonly\0"     No_argument "v"
                "createdevice\0" No_argument "c"
                "neverquit\0"    No_argument "Q"
@@ -378,7 +378,7 @@ int conspy_main(int argc UNUSED_PARAM, char **argv)
                "framebuffer\0"  No_argument "F"
                ;
 
-       applet_long_options = getopt_longopts;
+       applet_long_options = conspy_longopts;
 #endif
 #define keybuf bb_common_bufsiz1
        setup_common_bufsiz();
index ec35af18f40883cfa4a3218401ae1ff3e0ae7748..b55e07adb866ddd7325d14a8acc9987a5f1eff0d 100644 (file)
@@ -38,13 +38,13 @@ int flock_main(int argc UNUSED_PARAM, char **argv)
        };
 
 #if ENABLE_LONG_OPTS
-       static const char getopt_longopts[] ALIGN1 =
+       static const char flock_longopts[] ALIGN1 =
                "shared\0"      No_argument       "s"
                "exclusive\0"   No_argument       "x"
                "unlock\0"      No_argument       "u"
                "nonblock\0"    No_argument       "n"
                ;
-       applet_long_options = getopt_longopts;
+       applet_long_options = flock_longopts;
 #endif
        opt_complementary = "-1";
 
index 49b3ceb7214a50c3aa89103f96af7f7a2ee6cbac..1fbf0c857679be9de61b2da82d44b4618dd2dea2 100644 (file)
@@ -63,13 +63,13 @@ int fstrim_main(int argc UNUSED_PARAM, char **argv)
        };
 
 #if ENABLE_LONG_OPTS
-       static const char getopt_longopts[] ALIGN1 =
+       static const char fstrim_longopts[] ALIGN1 =
                "offset\0"    Required_argument    "o"
                "length\0"    Required_argument    "l"
                "minimum\0"   Required_argument    "m"
                "verbose\0"   No_argument          "v"
                ;
-       applet_long_options = getopt_longopts;
+       applet_long_options = fstrim_longopts;
 #endif
 
        opt_complementary = "=1"; /* exactly one non-option arg: the mountpoint */
index 89b439163b71a6aeb410dbaf30c799fe4caf1d8a..4cb9842a0f56bf11695d6fe4b629f08f1ce8ffb0 100644 (file)
@@ -71,7 +71,7 @@ int script_main(int argc UNUSED_PARAM, char **argv)
        };
 
 #if ENABLE_LONG_OPTS
-       static const char getopt_longopts[] ALIGN1 =
+       static const char script_longopts[] ALIGN1 =
                "append\0"  No_argument       "a"
                "command\0" Required_argument "c"
                "flush\0"   No_argument       "f"
@@ -79,7 +79,7 @@ int script_main(int argc UNUSED_PARAM, char **argv)
                "timing\0"  Optional_argument "t"
                ;
 
-       applet_long_options = getopt_longopts;
+       applet_long_options = script_longopts;
 #endif
 
        opt_complementary = "?1"; /* max one arg */