linux-hotplug.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Ruud Linders <rkmp@xs4all.nl>
To: linux-hotplug@vger.kernel.org
Subject: hotplug.functions  missing "LOADED=true" ?
Date: Sat, 13 Sep 2003 11:04:16 +0000	[thread overview]
Message-ID: <marc-linux-hotplug-106345114023016@msgid-missing> (raw)


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

             reply	other threads:[~2003-09-13 11:04 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-09-13 11:04 Ruud Linders [this message]
  -- strict thread matches above, loose matches on Subject: below --
2003-10-13 23:32 hotplug.functions missing "LOADED=true" ? Greg KH

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-106345114023016@msgid-missing \
    --to=rkmp@xs4all.nl \
    --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 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).