[PATCH 1/2] modprobe: allow blacklist for compatibility
Felipe Contreras
felipe.contreras at gmail.com
Tue Jan 31 14:46:11 UTC 2012
On Tue, Jan 31, 2012 at 3:56 PM, Denys Vlasenko
<vda.linux at googlemail.com> wrote:
> On Fri, Jan 20, 2012 at 12:07 AM, Felipe Contreras
> <felipe.contreras at gmail.com> wrote:
>> Signed-off-by: Felipe Contreras <felipe.contreras at gmail.com>
>> ---
>> modutils/modprobe.c | 14 +++++---------
>> 1 files changed, 5 insertions(+), 9 deletions(-)
>>
>> diff --git a/modutils/modprobe.c b/modutils/modprobe.c
>> index c1a1828..3fa8bf4 100644
>> --- a/modutils/modprobe.c
>> +++ b/modutils/modprobe.c
>> @@ -86,7 +86,7 @@
>> //usage: " from the command line\n"
>> //usage:
>> //usage:#define modprobe_trivial_usage
>> -//usage: "[-alrqvsD" IF_FEATURE_MODPROBE_BLACKLIST("b") "]"
>> +//usage: "[-alrqvsDb]"
>> //usage: " MODULE [symbol=value]..."
>> //usage:#define modprobe_full_usage "\n\n"
>> //usage: " -a Load multiple MODULEs"
>> @@ -96,17 +96,15 @@
>> //usage: "\n -v Verbose"
>> //usage: "\n -s Log to syslog"
>> //usage: "\n -D Show dependencies"
>> -//usage: IF_FEATURE_MODPROBE_BLACKLIST(
>> -//usage: "\n -b Apply blacklist to module names too"
>> -//usage: )
>> +//usage: "\n -b Apply blacklist to module names too (if supported)"
>> //usage:#endif /* !ENABLE_MODPROBE_SMALL */
>>
>> /* Note that usage text doesn't document various 2.4 options
>> * we pull in through INSMOD_OPTS define */
>> -#define MODPROBE_OPTS "alrD" IF_FEATURE_MODPROBE_BLACKLIST("b")
>> +#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_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"
>> enum {
>> OPT_INSERT_ALL = (INSMOD_OPT_UNUSED << 0), /* a */
>> @@ -119,7 +117,7 @@ enum {
>> //OPT_VERONLY = (INSMOD_OPT_UNUSED << x), /* V */
>> //OPT_CONFIGFILE = (INSMOD_OPT_UNUSED << x), /* C */
>> OPT_SHOW_DEPS = (INSMOD_OPT_UNUSED << 3), /* D */
>> - OPT_BLACKLIST = (INSMOD_OPT_UNUSED << 4) * ENABLE_FEATURE_MODPROBE_BLACKLIST,
>> + OPT_BLACKLIST = (INSMOD_OPT_UNUSED << 4), /* b */
>> };
>> #if ENABLE_LONG_OPTS
>> static const char modprobe_longopts[] ALIGN1 =
>> @@ -134,9 +132,7 @@ static const char modprobe_longopts[] ALIGN1 =
>> * but no short -D, we provide long opt for scripts which
>> * were written for 3.11.1: */
>> "show-depends\0" No_argument "D"
>> - // IF_FEATURE_MODPROBE_BLACKLIST(
>> // "use-blacklist\0" No_argument "b"
>> - // )
>> ;
>> #endif
>
>
> This change in effect removed FEATURE_MODPROBE_BLACKLIST.
> It still exists, but nothing depends on it.
Huh? It's still there:
} else if (ENABLE_FEATURE_MODPROBE_BLACKLIST
&& strcmp(tokens[0], "blacklist") == 0
) {
/* blacklist <modulename> */
get_or_add_modentry(tokens[1])->flags |= MODULE_FLAG_BLACKLISTED;
}
So -b would do nothing if FEATURE_MODPROBE_BLACKLIST is not enabled.
But it would show on the options and everything, and the help is clear:
Apply blacklist to module names too (if supported)"
> You should not change OPT_BLACKLIST.
Why not? It would not have any effect anyway.
--
Felipe Contreras
More information about the busybox
mailing list