aboutsummaryrefslogtreecommitdiff
path: root/modutils
diff options
context:
space:
mode:
Diffstat (limited to 'modutils')
-rw-r--r--modutils/modinfo.c3
-rw-r--r--modutils/modprobe-small.c3
-rw-r--r--modutils/modprobe.c8
3 files changed, 7 insertions, 7 deletions
diff --git a/modutils/modinfo.c b/modutils/modinfo.c
index 0f1d3ee47..3f91622a9 100644
--- a/modutils/modinfo.c
+++ b/modutils/modinfo.c
@@ -148,8 +148,7 @@ int modinfo_main(int argc UNUSED_PARAM, char **argv)
unsigned i;
field = NULL;
- opt_complementary = "-1"; /* minimum one param */
- opts = getopt32(argv, "0F:nadlp", &field);
+ opts = getopt32(argv, "^" "0F:nadlp" "\0" "-1"/*minimum one arg*/, &field);
/* If no field selected, show all */
if (!(opts & (OPT_TAGS|OPT_F)))
option_mask32 |= OPT_TAGS;
diff --git a/modutils/modprobe-small.c b/modutils/modprobe-small.c
index cd4f554f3..a94b0b9a6 100644
--- a/modutils/modprobe-small.c
+++ b/modutils/modprobe-small.c
@@ -988,10 +988,9 @@ int modprobe_main(int argc UNUSED_PARAM, char **argv)
#if ENABLE_MODPROBE || ENABLE_INSMOD || ENABLE_RMMOD
/* modprobe, insmod, rmmod require at least one argument */
- opt_complementary = "-1";
/* only -q (quiet) and -r (rmmod),
* the rest are accepted and ignored (compat) */
- getopt32(argv, "qrfsvwb");
+ getopt32(argv, "^" "qrfsvwb" "\0" "-1");
argv += optind;
if (is_modprobe) {
diff --git a/modutils/modprobe.c b/modutils/modprobe.c
index 2dac8a895..59f6d54f3 100644
--- a/modutils/modprobe.c
+++ b/modutils/modprobe.c
@@ -133,7 +133,7 @@
*/
#define MODPROBE_OPTS "alrDb"
/* -a and -D _are_ in fact compatible */
-#define MODPROBE_COMPLEMENTARY ("q-v:v-q:l--arD:r--alD:a--lr:D--rl")
+#define MODPROBE_COMPLEMENTARY "q-v:v-q:l--arD:r--alD:a--lr:D--rl"
//#define MODPROBE_OPTS "acd:lnrt:C:b"
//#define MODPROBE_COMPLEMENTARY "q-v:v-q:l--acr:a--lr:r--al"
enum {
@@ -566,8 +566,10 @@ int modprobe_main(int argc UNUSED_PARAM, char **argv)
INIT_G();
- opt_complementary = MODPROBE_COMPLEMENTARY;
- opt = getopt32long(argv, INSMOD_OPTS MODPROBE_OPTS, modprobe_longopts INSMOD_ARGS);
+ opt = getopt32long(argv, "^" INSMOD_OPTS MODPROBE_OPTS "\0" MODPROBE_COMPLEMENTARY,
+ modprobe_longopts
+ INSMOD_ARGS
+ );
argv += optind;
/* Goto modules location */