aboutsummaryrefslogtreecommitdiffstats
path: root/fbtools.c
diff options
context:
space:
mode:
authorkraxel <kraxel>2006-06-13 13:35:48 +0000
committerkraxel <kraxel>2006-06-13 13:35:48 +0000
commit8992ff2c2c6e60d88f0e22a048f343947c458cc3 (patch)
treecce54e530a1f4c7c9a44e876ab9ce28a955e5ca7 /fbtools.c
parent34eca660e8d21ada08c150e0d6e8ed048e1ab380 (diff)
downloadfbida-8992ff2c2c6e60d88f0e22a048f343947c458cc3.tar.gz
merge a bunch of fixed from Alan Curry
Diffstat (limited to 'fbtools.c')
-rw-r--r--fbtools.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/fbtools.c b/fbtools.c
index 563df90..d3ef8a8 100644
--- a/fbtools.c
+++ b/fbtools.c
@@ -449,7 +449,7 @@ fb_init(char *device, char *mode, int vt)
fb_activate_current(tty);
/* cls */
- fb_memset(fb_mem+fb_mem_offset,0,fb_fix.smem_len);
+ fb_memset(fb_mem+fb_mem_offset, 0, fb_fix.line_length * fb_var.yres);
return fb;
err:
@@ -461,6 +461,8 @@ void
fb_cleanup(void)
{
/* restore console */
+ if (-1 == ioctl(tty,KDSETMODE, kd_mode))
+ perror("ioctl KDSETMODE");
if (-1 == ioctl(fb,FBIOPUT_VSCREENINFO,&fb_ovar))
perror("ioctl FBIOPUT_VSCREENINFO");
if (-1 == ioctl(fb,FBIOGET_FSCREENINFO,&fb_fix))
@@ -472,8 +474,6 @@ fb_cleanup(void)
}
close(fb);
- if (-1 == ioctl(tty,KDSETMODE, kd_mode))
- perror("ioctl KDSETMODE");
if (-1 == ioctl(tty,VT_SETMODE, &vt_omode))
perror("ioctl VT_SETMODE");
if (orig_vt_no && -1 == ioctl(tty, VT_ACTIVATE, orig_vt_no))