From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ian Abbott Date: Fri, 06 Jun 2003 13:18:53 +0000 Subject: hotplug.functions load_drivers() error 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 Dear all, There is a bug in the load_drivers() function in hotplug.functions. =20 On my machine it manifests as a bunch of messages on the console=20 such as: /etc/hotplug/pci.agent: line 167: [: =3D: unary operator expected ... /etc/hotplug/usb.agent: line 167: [: =3D: unary operator expected ... See=20 . The problem is that $LOADED is conditionally set each time around=20 the "for $MODULE in $DRIVERS" loop, but unconditionally tested, so=20 $LOADED could be null or whatever it was in the previous iteration. Is the correct fix to move the "LOADED=FAlse" line to the top of the=20 loop, or is there more to than that? --- etc/hotplug/hotplug.functions.orig 2003-04-15=20 17:38:42.000000000 +0100 +++ etc/hotplug/hotplug.functions 2003-06-06=20 14:16:47.000000000 +0100 @@ -131,13 +131,13 @@ for MODULE in $DRIVERS do # 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 - LOADED=FAlse # 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