* [PATCH] syntax error in load_drivers, LOADED unset
@ 2003-06-09 11:42 Olaf Hering
2003-06-09 15:56 ` David Brownell
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: Olaf Hering @ 2003-06-09 11:42 UTC (permalink / raw)
To: linux-hotplug
This avoids the ' if [ = false ] ' syntax error:
I have seen it also in the debian patch.
Index: etc/hotplug/hotplug.functions
=================================RCS file: /cvsroot/linux-hotplug/admin/etc/hotplug/hotplug.functions,v
retrieving revision 1.19
diff -u -r1.19 hotplug.functions
--- etc/hotplug/hotplug.functions 6 Jun 2003 18:26:57 -0000 1.19
+++ etc/hotplug/hotplug.functions 9 Jun 2003 11:39:07 -0000
@@ -171,7 +171,7 @@
LOADED=true
fi
- if [ $LOADED = false ]; then
+ if [ "$LOADED" = false ]; then
mesg "missing kernel or user mode driver $MODULE "
fi
done
--
USB is for mice, FireWire is for men!
-------------------------------------------------------
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] 5+ messages in thread
* Re: [PATCH] syntax error in load_drivers, LOADED unset
2003-06-09 11:42 [PATCH] syntax error in load_drivers, LOADED unset Olaf Hering
@ 2003-06-09 15:56 ` David Brownell
2003-06-09 16:02 ` Olaf Hering
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: David Brownell @ 2003-06-09 15:56 UTC (permalink / raw)
To: linux-hotplug
Olaf Hering wrote:
> This avoids the ' if [ = false ] ' syntax error:
> I have seen it also in the debian patch.
Not needed with that other fix to initialize LOADED at the
top of the loop ...
> Index: etc/hotplug/hotplug.functions
> =================================> RCS file: /cvsroot/linux-hotplug/admin/etc/hotplug/hotplug.functions,v
> retrieving revision 1.19
> diff -u -r1.19 hotplug.functions
> --- etc/hotplug/hotplug.functions 6 Jun 2003 18:26:57 -0000 1.19
> +++ etc/hotplug/hotplug.functions 9 Jun 2003 11:39:07 -0000
> @@ -171,7 +171,7 @@
> LOADED=true
> fi
>
> - if [ $LOADED = false ]; then
> + if [ "$LOADED" = false ]; then
> mesg "missing kernel or user mode driver $MODULE "
> fi
> done
-------------------------------------------------------
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] 5+ messages in thread
* Re: [PATCH] syntax error in load_drivers, LOADED unset
2003-06-09 11:42 [PATCH] syntax error in load_drivers, LOADED unset Olaf Hering
2003-06-09 15:56 ` David Brownell
@ 2003-06-09 16:02 ` Olaf Hering
2003-06-10 10:51 ` Olaf Hering
2003-06-11 0:29 ` David Brownell
3 siblings, 0 replies; 5+ messages in thread
From: Olaf Hering @ 2003-06-09 16:02 UTC (permalink / raw)
To: linux-hotplug
On Mon, Jun 09, David Brownell wrote:
> Olaf Hering wrote:
> >This avoids the ' if [ = false ] ' syntax error:
> >I have seen it also in the debian patch.
>
> Not needed with that other fix to initialize LOADED at the
> top of the loop ...
you are right, I forgot to apply the cvs patch to my tree.
--
USB is for mice, FireWire is for men!
-------------------------------------------------------
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] 5+ messages in thread
* Re: [PATCH] syntax error in load_drivers, LOADED unset
2003-06-09 11:42 [PATCH] syntax error in load_drivers, LOADED unset Olaf Hering
2003-06-09 15:56 ` David Brownell
2003-06-09 16:02 ` Olaf Hering
@ 2003-06-10 10:51 ` Olaf Hering
2003-06-11 0:29 ` David Brownell
3 siblings, 0 replies; 5+ messages in thread
From: Olaf Hering @ 2003-06-10 10:51 UTC (permalink / raw)
To: linux-hotplug
On Mon, Jun 09, David Brownell wrote:
> Olaf Hering wrote:
> >This avoids the ' if [ = false ] ' syntax error:
> >I have seen it also in the debian patch.
>
> Not needed with that other fix to initialize LOADED at the
> top of the loop ...
I believe the current code is buggy.
We set LOADED to false
'lsmod | grep -q "^$MODULE "' will trigger the blacklist check and the
modprobe.
If the driver is already loaded because another device triggered a load
earlier, or because it was loaded for other reasons, then LOADED will
remain 'false'.
LOADED will eventually become true if a usermode helper $TYPE/$MODULE
exists. If none exists, this message is triggered, which is misleading:
mesg "missing kernel or user mode driver $MODULE "
Was something like this the intention?
...
for MODULE in $DRIVERS
do
# maybe driver modules need loading
LOADEDúlse
lsmod | grep -q "^$MODULE " && LOADED=true
if [ $LOADED = false ] ; then
...
Gruss Olaf
--
USB is for mice, FireWire is for men!
-------------------------------------------------------
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] 5+ messages in thread
* Re: [PATCH] syntax error in load_drivers, LOADED unset
2003-06-09 11:42 [PATCH] syntax error in load_drivers, LOADED unset Olaf Hering
` (2 preceding siblings ...)
2003-06-10 10:51 ` Olaf Hering
@ 2003-06-11 0:29 ` David Brownell
3 siblings, 0 replies; 5+ messages in thread
From: David Brownell @ 2003-06-11 0:29 UTC (permalink / raw)
To: linux-hotplug
Olaf Hering wrote:
>
> If the driver is already loaded because another device triggered a load
> earlier, or because it was loaded for other reasons, then LOADED will
> remain 'false'.
> LOADED will eventually become true if a usermode helper $TYPE/$MODULE
> exists. If none exists, this message is triggered, which is misleading:
> mesg "missing kernel or user mode driver $MODULE "
No message should be emitted if there was no
per-device setup script, unless it also failed
to load the kernel module ... or something like
that.
The logic there could stand improvement.
-------------------------------------------------------
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] 5+ messages in thread
end of thread, other threads:[~2003-06-11 0:29 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-06-09 11:42 [PATCH] syntax error in load_drivers, LOADED unset Olaf Hering
2003-06-09 15:56 ` David Brownell
2003-06-09 16:02 ` Olaf Hering
2003-06-10 10:51 ` Olaf Hering
2003-06-11 0:29 ` David Brownell
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.