Re: showstoppers when moving from kernel 2.4 to 2.6
Am Donnerstag, 25. November 2004 22:27 schrieb Joerg Friedrich:
> After searching a while I found a solution. gentoo had a patch, so it
> should work now. the patch should appear on
> http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=250619 soon :-)
This one?
+# Building the devicelist:
+# Kernel 2.4 running'
+if [ `dmesg | grep -c "Elite 3D"` -ne 0 ]; then
+ afb_devs=`/bin/dmesg | /bin/egrep -i "Elite 3D" | /bin/sed 's/\:.*//'`
+fi
+
+# Kernel 2.6:
+if [ `/bin/dmesg | /bin/grep -c "ffb: AFB"` -gt 0 ]; then
+ afb_devs=`/bin/cat -s /proc/fb | /bin/egrep -i "Elite 3D" | /bin/sed
's/\ .*//' | /bin/sed 's/^/fb/'`
+fi
First thing is useless use of cat and why egrep instead of grep? You can also
remove one sed (untested):
afb_devs=fb`/bin/grep -i "Elite 3D" /proc/fb | /bin/sed 's/\ .*//'`
Those are two programs less to execute...
And maybe put case for 2.4.* and 2.6.* so not both have to be executed. This
way, you can get rid of both if statements.
HS
--
Mein GPG-Key ist auf meiner Homepage verfügbar: http://www.hendrik-sattler.de
oder über pgp.net
PingoS - Linux-User helfen Schulen: http://www.pingos.org
Reply to: