25 #include <sys/ioctl.h>
66 const char *dev = getenv(
"FRAMEBUFFER");
74 struct fb_var_screeninfo varinfo;
75 struct fb_fix_screeninfo fixinfo;
84 for (i = 0; i <= 31; i++) {
85 snprintf(device_file,
sizeof(device_file),
"/dev/fb%d", i);
94 if (ioctl(fd, FBIOGET_VSCREENINFO, &varinfo) == -1)
96 if (ioctl(fd, FBIOGET_FSCREENINFO, &fixinfo) == -1)
115 if (default_device && !strcmp(device->
device_name, default_device)) {
117 default_device =
NULL;