Re: [PATCH] rmmod: Teach rmmod about builtin modules

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Mar 18, 2013 at 11:20:37AM -0300, Lucas De Marchi wrote:
> Hi Josh,
> 
> On Fri, Mar 15, 2013 at 2:43 PM, Josh Boyer <jwboyer@xxxxxxxxxx> wrote:
> > Currently modprobe -r will fail if a module is built in and report that it
> > is built in.  rmmod calls the same function to determine state but doesn't
> > handle the KMOD_MODULE_BUILTIN return code.  This leads to confusing errors
> > like this:
> >
> >         libkmod: kmod_module_get_holders: could not open '/sys/module/loop/holders': No such file or directory
> >         Error: Module loop is in use
> >
> > Fix this so that it actually reports the correct problem to the user.
> > ---
> >  tools/rmmod.c | 8 +++++++-
> >  1 file changed, 7 insertions(+), 1 deletion(-)
> >
> > diff --git a/tools/rmmod.c b/tools/rmmod.c
> > index 7f2c2f6..7f4431c 100644
> > --- a/tools/rmmod.c
> > +++ b/tools/rmmod.c
> > @@ -62,8 +62,14 @@ static void help(void)
> >
> >  static int check_module_inuse(struct kmod_module *mod) {
> >         struct kmod_list *holders;
> > +       int state;
> 
> I removed a trailing whitespace on this line and applied the patch.

Oops.  My apologies for that.  Thank you.

josh
--
To unsubscribe from this list: send the line "unsubscribe linux-modules" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux