[PATCH 1/2] modprobe: allow blacklist for compatibility

Denys Vlasenko vda.linux at googlemail.com
Tue Jan 31 15:14:27 UTC 2012


On Tue, Jan 31, 2012 at 3:46 PM, Felipe Contreras
<felipe.contreras at gmail.com> wrote:
>> 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.

I see. You're right.

> But it would show on the options and everything, and the help is clear:
>
>  Apply blacklist to module names too (if supported)"

Usually I don't include no-op options into help text.
I only include those which actually work.


>> You should not change OPT_BLACKLIST.
>
> Why not? It would not have any effect anyway.


                        if (!(opt & OPT_BLACKLIST)
                         || !(me->flags & MODULE_FLAG_BLACKLISTED)
                        ) {
                                rc |= do_modprobe(me);
                        }

To not do a useless check here ^^^^^^^^^^^

-- 
vda


More information about the busybox mailing list