linux-hotplug.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* hotplug.functions  missing "LOADED=true" ?
@ 2003-09-13 11:04 Ruud Linders
  0 siblings, 0 replies; 2+ messages in thread
From: Ruud Linders @ 2003-09-13 11:04 UTC (permalink / raw)
  To: linux-hotplug


Hello,

Just in case this wasn't noted before....

With the hotplug tools from hotplug-2003_08_05, I'm seeing a lot of
   "missing kernel or user mode driver $MODULE "
messages for every time there is a hotplug event (inserting USB memory
stick)

In the hotplug.functions there is the following check if modules are
already loaded:

         # maybe driver modules need loading
         LOADEDúlse
         if ! lsmod | grep -q "^$MODULE " > /dev/null 2>&1; then
             if grep -q "^$MODULE\$" $HOTPLUG_DIR/blacklist \
                     >/dev/null 2>&1; then
                 debug_mesg "... blacklisted module:  $MODULE"
                 continue
             fi

             # statically linked modules aren't shown by 'lsmod',
             # and user mode drivers will ONLY have a setup script;
             # it's not an error if a module doesn't exist or won't load.
             if $MODPROBE -n $MODULE >/dev/null 2>&1 &&
                     ! $MODPROBE $MODULE >/dev/null 2>&1 ; then
                 mesg "... can't load module $MODULE"
             else
                 # /etc/modules.conf may have set non-default module
                 # parameters ... handle per-device parameters in apps
                 # (ioctls etc) not in setup scripts or modules.conf
                 LOADED=true
             fi
         fi


It looks to me that the else statement for the first 'if' is
missing so I changed it to
      if ! lsmod | grep -q "^$MODULE " > /dev/null 2>&1; then
       .......
      else
         LOADED=true
      fi
which fixed the messages complaining about missing drivers.


Even nicer (more readable) would be the reverse the logic to:
      if  lsmod | grep -q "^$MODULE " > /dev/null 2>&1; then
         LOADED=true
      else
         .......
      fi


Regards,
_
Ruud Linders




-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
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

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: hotplug.functions  missing "LOADED=true" ?
@ 2003-10-13 23:32 Greg KH
  0 siblings, 0 replies; 2+ messages in thread
From: Greg KH @ 2003-10-13 23:32 UTC (permalink / raw)
  To: linux-hotplug

On Sat, Sep 13, 2003 at 01:04:16PM +0200, Ruud Linders wrote:
> 
> Hello,
> 
> Just in case this wasn't noted before....
> 
> With the hotplug tools from hotplug-2003_08_05, I'm seeing a lot of
>   "missing kernel or user mode driver $MODULE "
> messages for every time there is a hotplug event (inserting USB memory
> stick)
> 
> In the hotplug.functions there is the following check if modules are
> already loaded:

Ah, nice catch.  I just found this same problem and fixed it the same
way a few days ago.  Sorry for the long delay.

thanks,

greg k-h


-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
SourceForge.net hosts over 70,000 Open Source Projects.
See the people who have HELPED US provide better services:
Click here: http://sourceforge.net/supporters.php
_______________________________________________
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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2003-10-13 23:32 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-09-13 11:04 hotplug.functions missing "LOADED=true" ? Ruud Linders
  -- strict thread matches above, loose matches on Subject: below --
2003-10-13 23:32 Greg KH

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).