*
* This is a from-scratch implementation of fbset; but the de facto fbset
* implementation was a good reference. fbset (original) is released under
- * the GPL, and is (c) 1995-1999 by:
+ * the GPL, and is (c) 1995-1999 by:
* Geert Uytterhoeven (Geert.Uytterhoeven@cs.kuleuven.ac.be)
*/
#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);
struct fb_bitfield {
uint32_t offset; /* beginning of bitfield */
uint32_t length; /* length of bitfield */
- uint32_t msb_right; /* != 0 : Most significant bit is */
- /* right */
+ uint32_t msb_right; /* != 0 : Most significant bit is */
+ /* right */
};
struct fb_var_screeninfo {
uint32_t xres; /* visible resolution */
struct fb_bitfield red; /* bitfield in fb mem if true color, */
struct fb_bitfield green; /* else only length is significant */
struct fb_bitfield blue;
- struct fb_bitfield transp; /* transparency */
+ struct fb_bitfield transp; /* transparency */
uint32_t nonstd; /* != 0 Non standard pixel format */
if ((p = strstr(buf, "geometry "))) {
p += 9;
- sscanf(p, "%d %d %d %d %d",
- &(base->xres), &(base->yres),
- &(base->xres_virtual), &(base->yres_virtual),
+ sscanf(p, "%d %d %d %d %d",
+ &(base->xres), &(base->yres),
+ &(base->xres_virtual), &(base->yres_virtual),
&(base->bits_per_pixel));
} else if ((p = strstr(buf, "timings "))) {
p += 8;
-
+
sscanf(p, "%d %d %d %d %d %d %d",
&(base->pixclock),
&(base->left_margin), &(base->right_margin),
base->sync |= FB_SYNC_EXT;
}
}
-
+
if (strstr(buf, "endmode"))
return 1;
}