[PATCH] modutils.c: update rmmod message for ENOENT error
Maxin B. John
maxin.john at intel.com
Thu Oct 22 16:02:22 UTC 2015
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
More information about the busybox
mailing list