From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ruud Linders Date: Sat, 13 Sep 2003 11:04:16 +0000 Subject: hotplug.functions missing "LOADED=true" ? Message-Id: List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable To: linux-hotplug@vger.kernel.org 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=FAlse 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=3Dtrue 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=3Dtrue 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=3Dtrue 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