All of lore.kernel.org
 help / color / mirror / Atom feed
From: Olaf Hering <olh@suse.de>
To: linux-hotplug@vger.kernel.org
Subject: Re: [PATCH] syntax error in load_drivers, LOADED unset
Date: Tue, 10 Jun 2003 10:51:09 +0000	[thread overview]
Message-ID: <marc-linux-hotplug-105524298513780@msgid-missing> (raw)
In-Reply-To: <marc-linux-hotplug-105515918402378@msgid-missing>

 On Mon, Jun 09, David Brownell wrote:

> Olaf Hering wrote:
> >This avoids the ' if [ = false ] ' syntax error:
> >I have seen it also in the debian patch.
> 
> Not needed with that other fix to initialize LOADED at the
> top of the loop ...

I believe the current code is buggy.
We set LOADED to false
'lsmod | grep -q "^$MODULE "' will trigger the blacklist check and the
modprobe.
If the driver is already loaded because another device triggered a load
earlier, or because it was loaded for other reasons, then LOADED will
remain 'false'.
LOADED will eventually become true if a usermode helper $TYPE/$MODULE
exists. If none exists, this message is triggered, which is misleading:
mesg "missing kernel or user mode driver $MODULE "

Was something like this the intention?

...
    for MODULE in $DRIVERS
    do  
        # maybe driver modules need loading
        LOADEDúlse
        lsmod | grep -q "^$MODULE " && LOADED=true
        if [ $LOADED = false ] ; then
...


Gruss Olaf

-- 
USB is for mice, FireWire is for men!


-------------------------------------------------------
This SF.net email is sponsored by:  Etnus, makers of TotalView, The best
thread debugger on the planet. Designed with thread debugging features
you've never dreamed of, try TotalView 6 free at www.etnus.com.
_______________________________________________
Linux-hotplug-devel mailing list  http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel

  parent reply	other threads:[~2003-06-10 10:51 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-06-09 11:42 [PATCH] syntax error in load_drivers, LOADED unset Olaf Hering
2003-06-09 15:56 ` David Brownell
2003-06-09 16:02 ` Olaf Hering
2003-06-10 10:51 ` Olaf Hering [this message]
2003-06-11  0:29 ` David Brownell

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=marc-linux-hotplug-105524298513780@msgid-missing \
    --to=olh@suse.de \
    --cc=linux-hotplug@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.