[PATCH] Fix modprobe status reported v3

Gilles Espinasse g.esp at free.fr
Thu Jun 18 14:51:25 UTC 2009


----- Original Message ----- 
From: "Denys Vlasenko" <vda.linux at googlemail.com>
To: "Gilles Espinasse" <g.esp at free.fr>
Cc: <busybox at busybox.net>
Sent: Wednesday, June 17, 2009 6:45 PM
Subject: Re: [PATCH] Fix modprobe status reported v3


>> - if (!(m2->flags & MODULE_FLAG_BLACKLISTED))
>> - do_modprobe(m2);
>> -//FIXME: error check?
>> + if (!(m2->flags & MODULE_FLAG_BLACKLISTED)
>> + && (!(m2->flags & MODULE_FLAG_LOADED)
>> + || opt & MODPROBE_OPT_REMOVE )
>> + ) {
>> + rc=do_modprobe(m2);
>> + if (rc < 0 && !(opt & INSMOD_OPT_SILENT))
>> + bb_error_msg("module %s alias error",
>> + me->modname);
>> + }
>
> The error message is not informative. What is "alias error"?

I don't know in true bug life.
That should happen only if there is a bug in depmod during modules.alias
creation.
During test doing
echo "alias foo bar" >>/lib/modules/`uname -r`/modules.alias
modprobe foo
there was no message even the status was an error. So I add one message.
This happen only if there is an alias defined and corresponding module name
does not appear in modules.dep.

> Looks like we do not treat -q correctly. It should not suppress all
errors.

I didn't check that. I just had done the same as other messages
True that man page say that -q work only for module name, not alias.

> I am trying to fix it based on your patch. Can you try attached patch
> and let me know if you still have problems?

I have tried with master tree at 14f6f0a... fsync
The only case I find wrong is with foo alias existing and trying to unload
foo (does not exist, not loaded)
echo "alias foo bar" >>/lib/modules/`uname -r`/modules.alias
modprobe -r foo;echo $?
That should report 0 without a message
Instead we have an error status and this message
modprobe : module bar not found in modules.dep

M-I-T modprobe has no error in that case.

    Gilles



More information about the busybox mailing list