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);
89 if (ioctl(fd, FBIOGET_VSCREENINFO, &varinfo) == -1)
91 if (ioctl(fd, FBIOGET_FSCREENINFO, &fixinfo) == -1)
110 if (default_device && !strcmp(device->
device_name, default_device)) {
112 default_device = NULL;