* hotplug.functions load_drivers() error
@ 2003-06-06 13:18 Ian Abbott
2003-06-06 16:13 ` David Brownell
0 siblings, 1 reply; 2+ messages in thread
From: Ian Abbott @ 2003-06-06 13:18 UTC (permalink / raw)
To: linux-hotplug
Dear all,
There is a bug in the load_drivers() function in hotplug.functions.
On my machine it manifests as a bunch of messages on the console
such as:
/etc/hotplug/pci.agent: line 167: [: =: unary operator expected
...
/etc/hotplug/usb.agent: line 167: [: =: unary operator expected
...
See
<http://sourceforge.net/tracker/index.php?funcÞtail&aids5123&group_id\x17679&atid\x117679>.
The problem is that $LOADED is conditionally set each time around
the "for $MODULE in $DRIVERS" loop, but unconditionally tested, so
$LOADED could be null or whatever it was in the previous iteration.
Is the correct fix to move the "LOADEDúlse" line to the top of the
loop, or is there more to than that?
--- etc/hotplug/hotplug.functions.orig 2003-04-15
17:38:42.000000000 +0100
+++ etc/hotplug/hotplug.functions 2003-06-06
14:16:47.000000000 +0100
@@ -131,13 +131,13 @@
for MODULE in $DRIVERS
do
# 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
- LOADEDúlse
# statically linked modules aren't shown by 'lsmod',
# and user mode drivers will ONLY have a setup script;
-------------------------------------------------------
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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2003-06-06 16:13 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-06-06 13:18 hotplug.functions load_drivers() error Ian Abbott
2003-06-06 16:13 ` David Brownell
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).