This little convenience change in sprommod.sh allows you to call
sprommod.sh eth1 --all --verbose
(not in the other order, but that will give an error).

I thought it was easier to add this to sprommod.sh instead of the C
tool. It relies on the fact that all gettable options are printed out as
[beginning of line][space][space]--option[space][ignored stuff]

This might be useful when we want to see the sprom values people have...

johannes

--- sprom.orig/sprommod.sh
+++ sprom/sprommod.sh
@@ -11,6 +11,12 @@
 device="$1"
 shift
 
+args="$@"
+if [ "$1" = "--all" ] ; then
+  shift
+  args="`bcm43xx_sprom --help 2>&1| sed 's/  \(--[^ ]*\).*/\1 GET/;t;d' | tr 
'\n' ' '` $@"
+fi
+
 if [ -z "$device" ]; then
        echo "No DEVICE given"
        exit 1
@@ -22,7 +28,7 @@
        echo "Could not read SPROM ($err)"
        exit 1
 fi
-mod_data="$(echo "$orig_data" | bcm43xx_sprom $@)"
+mod_data="$(echo "$orig_data" | bcm43xx_sprom $args)"
 err=$?
 if [ $err -ne 0 ]; then
        echo "Could not modify SPROM data ($err)"


_______________________________________________
Bcm43xx-dev mailing list
Bcm43xx-dev@lists.berlios.de
http://lists.berlios.de/mailman/listinfo/bcm43xx-dev

Reply via email to