Re: [PATCH] modprobe does not print out dependee module falures.

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

 



On Wed, 2010-02-24 at 15:40 -0500, Jon Masters wrote:
> On Fri, 2010-01-29 at 23:01 +0000, Matthew W. S. Bell wrote:
> > When a failure occurs loading a dependee module, an error for this is
> > not printed, but an incorrect error is printed for each dependent
> > module. This patch changes this.
> 
> I see what you're trying to solve here, but the existing code has to
> handle the case of loading multiple modules by means of dependencies
> *and* in the case that -a is specified on the command line. I am
> thinking the following:
> 
> -               if ((error != warn) || (verbose))
> +               if (!all || verbose)
>                         error("Error inserting %s (%s): %s\n",
>                               mod->modname, mod->filename,
>                               insert_moderror(errno));
> 
> Needs to be:
> 
> if ((!all && (error != warn)) || (verbose))

Er, this reintroduces the bug again:

->: depends

!all: m->m->m->fail (no actual error message, but dependency errors)
      fail (error message)

 all: m->m->m->fail (no actual error message, but dependency errors),
      fail (no error message)

whereas, the original has the behaviour:

!all: m->m->m->fail (actual error, dependent errors)
      fail (actual error)

 all: m->m->m->m (no actual error message, but dependency errors)
      fail (no error message)

Which is the correct behaviour in the !all case, and the same behaviour
in the all case. Note that modprobe.c:insmod() returns early if there is
a dependency error, and the code in question is not executed.

I'm not quite sure what you're trying to achieve in the all case.

Matthew W.S. Bell

Attachment: signature.asc
Description: This is a digitally signed message part


[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