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>
This commit is contained in:
parent
c0657e0d0a
commit
428bd2d433
@ -805,7 +805,7 @@ int modprobe_main(int argc UNUSED_PARAM, char **argv)
|
|||||||
opt_complementary = "-1";
|
opt_complementary = "-1";
|
||||||
/* only -q (quiet) and -r (rmmod),
|
/* only -q (quiet) and -r (rmmod),
|
||||||
* the rest are accepted and ignored (compat) */
|
* the rest are accepted and ignored (compat) */
|
||||||
getopt32(argv, "qrfsvw");
|
getopt32(argv, "qrfsvwb");
|
||||||
argv += optind;
|
argv += optind;
|
||||||
|
|
||||||
/* are we rmmod? -> simulate modprobe -r */
|
/* are we rmmod? -> simulate modprobe -r */
|
||||||
|
@ -101,12 +101,15 @@
|
|||||||
//usage: )
|
//usage: )
|
||||||
//usage:#endif /* !ENABLE_MODPROBE_SMALL */
|
//usage:#endif /* !ENABLE_MODPROBE_SMALL */
|
||||||
|
|
||||||
/* Note that usage text doesn't document various 2.4 options
|
/* Note: usage text doesn't document various 2.4 options
|
||||||
* we pull in through INSMOD_OPTS define */
|
* we pull in through INSMOD_OPTS define
|
||||||
#define MODPROBE_OPTS "alrD" IF_FEATURE_MODPROBE_BLACKLIST("b")
|
* Note2: -b is always accepted, but if !FEATURE_MODPROBE_BLACKLIST,
|
||||||
|
* it is a no-op.
|
||||||
|
*/
|
||||||
|
#define MODPROBE_OPTS "alrDb"
|
||||||
/* -a and -D _are_ in fact compatible */
|
/* -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:" IF_FEATURE_MODPROBE_BLACKLIST("b")
|
//#define MODPROBE_OPTS "acd:lnrt:C:b"
|
||||||
//#define MODPROBE_COMPLEMENTARY "q-v:v-q:l--acr:a--lr:r--al"
|
//#define MODPROBE_COMPLEMENTARY "q-v:v-q:l--acr:a--lr:r--al"
|
||||||
enum {
|
enum {
|
||||||
OPT_INSERT_ALL = (INSMOD_OPT_UNUSED << 0), /* a */
|
OPT_INSERT_ALL = (INSMOD_OPT_UNUSED << 0), /* a */
|
||||||
@ -133,10 +136,8 @@ static const char modprobe_longopts[] ALIGN1 =
|
|||||||
/* module-init-tools 3.11.1 has only long opt --show-depends
|
/* module-init-tools 3.11.1 has only long opt --show-depends
|
||||||
* but no short -D, we provide long opt for scripts which
|
* but no short -D, we provide long opt for scripts which
|
||||||
* were written for 3.11.1: */
|
* were written for 3.11.1: */
|
||||||
"show-depends\0" No_argument "D"
|
"show-depends\0" No_argument "D"
|
||||||
// IF_FEATURE_MODPROBE_BLACKLIST(
|
|
||||||
// "use-blacklist\0" No_argument "b"
|
// "use-blacklist\0" No_argument "b"
|
||||||
// )
|
|
||||||
;
|
;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user