diff options
author | Felipe Contreras <felipe.contreras@gmail.com> | 2012-01-31 14:55:15 +0100 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2012-01-31 14:55:15 +0100 |
commit | 428bd2d4337dbd83feb3c7d1fc04d840f548003c (patch) | |
tree | 716b1d6a6c6f09b1a03af7b1088669aca1ec6bd6 | |
parent | c0657e0d0a3a818e2c857f99f0b0ddf936324fdb (diff) | |
download | busybox-w32-428bd2d4337dbd83feb3c7d1fc04d840f548003c.tar.gz busybox-w32-428bd2d4337dbd83feb3c7d1fc04d840f548003c.tar.bz2 busybox-w32-428bd2d4337dbd83feb3c7d1fc04d840f548003c.zip |
modprobe: accept -b even if blacklist functionality is disabled
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
-rw-r--r-- | modutils/modprobe-small.c | 2 | ||||
-rw-r--r-- | modutils/modprobe.c | 15 |
2 files changed, 9 insertions, 8 deletions
diff --git a/modutils/modprobe-small.c b/modutils/modprobe-small.c index f5b283b47..5ea1be99d 100644 --- a/modutils/modprobe-small.c +++ b/modutils/modprobe-small.c | |||
@@ -805,7 +805,7 @@ int modprobe_main(int argc UNUSED_PARAM, char **argv) | |||
805 | opt_complementary = "-1"; | 805 | opt_complementary = "-1"; |
806 | /* only -q (quiet) and -r (rmmod), | 806 | /* only -q (quiet) and -r (rmmod), |
807 | * the rest are accepted and ignored (compat) */ | 807 | * the rest are accepted and ignored (compat) */ |
808 | getopt32(argv, "qrfsvw"); | 808 | getopt32(argv, "qrfsvwb"); |
809 | argv += optind; | 809 | argv += optind; |
810 | 810 | ||
811 | /* are we rmmod? -> simulate modprobe -r */ | 811 | /* are we rmmod? -> simulate modprobe -r */ |
diff --git a/modutils/modprobe.c b/modutils/modprobe.c index c1a1828d7..fb6c65990 100644 --- a/modutils/modprobe.c +++ b/modutils/modprobe.c | |||
@@ -101,12 +101,15 @@ | |||
101 | //usage: ) | 101 | //usage: ) |
102 | //usage:#endif /* !ENABLE_MODPROBE_SMALL */ | 102 | //usage:#endif /* !ENABLE_MODPROBE_SMALL */ |
103 | 103 | ||
104 | /* Note that usage text doesn't document various 2.4 options | 104 | /* Note: usage text doesn't document various 2.4 options |
105 | * we pull in through INSMOD_OPTS define */ | 105 | * we pull in through INSMOD_OPTS define |
106 | #define MODPROBE_OPTS "alrD" IF_FEATURE_MODPROBE_BLACKLIST("b") | 106 | * Note2: -b is always accepted, but if !FEATURE_MODPROBE_BLACKLIST, |
107 | * it is a no-op. | ||
108 | */ | ||
109 | #define MODPROBE_OPTS "alrDb" | ||
107 | /* -a and -D _are_ in fact compatible */ | 110 | /* -a and -D _are_ in fact compatible */ |
108 | #define MODPROBE_COMPLEMENTARY ("q-v:v-q:l--arD:r--alD:a--lr:D--rl") | 111 | #define MODPROBE_COMPLEMENTARY ("q-v:v-q:l--arD:r--alD:a--lr:D--rl") |
109 | //#define MODPROBE_OPTS "acd:lnrt:C:" IF_FEATURE_MODPROBE_BLACKLIST("b") | 112 | //#define MODPROBE_OPTS "acd:lnrt:C:b" |
110 | //#define MODPROBE_COMPLEMENTARY "q-v:v-q:l--acr:a--lr:r--al" | 113 | //#define MODPROBE_COMPLEMENTARY "q-v:v-q:l--acr:a--lr:r--al" |
111 | enum { | 114 | enum { |
112 | OPT_INSERT_ALL = (INSMOD_OPT_UNUSED << 0), /* a */ | 115 | OPT_INSERT_ALL = (INSMOD_OPT_UNUSED << 0), /* a */ |
@@ -133,10 +136,8 @@ static const char modprobe_longopts[] ALIGN1 = | |||
133 | /* module-init-tools 3.11.1 has only long opt --show-depends | 136 | /* module-init-tools 3.11.1 has only long opt --show-depends |
134 | * but no short -D, we provide long opt for scripts which | 137 | * but no short -D, we provide long opt for scripts which |
135 | * were written for 3.11.1: */ | 138 | * were written for 3.11.1: */ |
136 | "show-depends\0" No_argument "D" | 139 | "show-depends\0" No_argument "D" |
137 | // IF_FEATURE_MODPROBE_BLACKLIST( | ||
138 | // "use-blacklist\0" No_argument "b" | 140 | // "use-blacklist\0" No_argument "b" |
139 | // ) | ||
140 | ; | 141 | ; |
141 | #endif | 142 | #endif |
142 | 143 | ||