hotplug.functions missing "LOADED=true" ?
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
fiIt 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
fiwhich 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
.......
fiRegards,
_
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
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel