aboutsummaryrefslogtreecommitdiffstats
path: root/fbtools.c
diff options
context:
space:
mode:
Diffstat (limited to 'fbtools.c')
-rw-r--r--fbtools.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/fbtools.c b/fbtools.c
index 1ee8639..a429775 100644
--- a/fbtools.c
+++ b/fbtools.c
@@ -224,6 +224,7 @@ static void fb_cleanup_display(void)
gfxstate* fb_init(char *device, char *mode, int vt)
{
unsigned long page_mask;
+ struct stat st;
gfxstate *gfx;
if (vt != 0)
@@ -334,6 +335,10 @@ gfxstate* fb_init(char *device, char *mode, int vt)
gfx->restore_display = fb_restore_display;
gfx->cleanup_display = fb_cleanup_display;
+
+ fstat(fb, &st);
+ gfx->devnum = st.st_rdev;
+
return gfx;
err: