[PATCH] modutils.c: update rmmod message for ENOENT error

Denys Vlasenko vda.linux at googlemail.com
Sat Oct 24 03:34:43 UTC 2015


Please try current git.

On Thu, Oct 22, 2015 at 6:02 PM, Maxin B. John <maxin.john at intel.com> wrote:
> Hi,
>
> On Thu, Oct 22, 2015 at 12:28:33PM +0000, dietmar.schindler at manroland-web.com wrote:
>> > Von: Maxin B. John
>> > Gesendet: Donnerstag, 22. Oktober 2015 12:52
>> >
>> > When we try to remove a non-existing module:
>> >
>> > $ rmmod nonexisting
>> > rmmod: can't unload 'nonexisting': unknown symbol in module, or unknown
>> > parameter
>> >
>> > man page of "delete_module" says:
>> > ENOENT: No module by that name exists.
>> >
>> > Update the inconsistent message.
>> >
>> > Signed-off-by: Maxin B. John <maxin.john at intel.com>
>> > ---
>> >  modutils/modutils.c | 2 +-
>> >  1 file changed, 1 insertion(+), 1 deletion(-)
>> >
>> > diff --git a/modutils/modutils.c b/modutils/modutils.c
>> > index 84300d9..3acd632 100644
>> > --- a/modutils/modutils.c
>> > +++ b/modutils/modutils.c
>> > @@ -198,7 +198,7 @@ const char* FAST_FUNC moderror(int err)
>> >       case ENOEXEC:
>> >               return "invalid module format";
>> >       case ENOENT:
>> > -             return "unknown symbol in module, or unknown parameter";
>> > +             return "no module by that name exists";
>> >       case ESRCH:
>> >               return "module has wrong symbol version";
>> >       case ENOSYS:
>> > --
>>
>> Isn't moderror() also possibly called when loading a module? In that case, unfortunately the original message would be right and the updated one wrong.
>> --
>
> Yes, you are right. Thanks for pointing out. However, we still need
> a "less confusing" message in rmmod case. Would it be acceptable to have
> two different messages for ENOENT in rmmod and insmod/modprobe ?
>
>> Regards,
>> Dietmar Schindler
>
> Best Regards,
> Maxin
> _______________________________________________
> busybox mailing list
> busybox at busybox.net
> http://lists.busybox.net/mailman/listinfo/busybox


More information about the busybox mailing list