[BusyBox] fbset /dev/fb/0 fix

Oskar Liljeblad oskar at osk.mine.nu
Sun Nov 2 14:14:12 UTC 2003


Here's a fix for the hard-coded device name in fbset:

I'm not subscribed to the list so please cc me in replies.

Regards,

Oskar Liljeblad (oskar at osk.mine.nu)

diff -u busybox-1.00-pre3/include/libbb.h.v0 busybox-1.00-pre3/include/libbb.h
--- busybox-1.00-pre3/include/libbb.h.v0        2003-09-03 14:18:38.000000000 +0200
+++ busybox-1.00-pre3/include/libbb.h   2003-11-02 15:04:12.000000000 +0100
@@ -372,6 +372,7 @@
 #endif
 # define VC_FORMAT "/dev/vc/%d"
 # define LOOP_FORMAT "/dev/loop/%d"
+# define FB_0 "/dev/fb/0"
 #else
 # define CURRENT_VC "/dev/tty0"
 # define VC_1 "/dev/tty1"
@@ -390,6 +391,7 @@
 #endif
 # define VC_FORMAT "/dev/tty%d"
 # define LOOP_FORMAT "/dev/loop%d"
+# define FB_0 "/dev/fb0"
 #endif
 
 //#warning put these in .o files
diff -u -p busybox-1.00-pre3/util-linux/fbset.c.v0 busybox-1.00-pre3/util-linux/fbset.c
--- busybox-1.00-pre3/util-linux/fbset.c.v0     2003-11-02 14:45:47.000000000 +0100
+++ busybox-1.00-pre3/util-linux/fbset.c        2003-11-02 15:04:30.000000000 +0100
@@ -35,7 +35,7 @@
 #include <sys/ioctl.h>
 #include "busybox.h"
 
-#define DEFAULTFBDEV  "/dev/fb0"
+#define DEFAULTFBDEV  FB_0
 #define DEFAULTFBMODE "/etc/fb.modes"
 
 static const int OPT_CHANGE   = (1 << 0);



More information about the busybox mailing list