From 8992ff2c2c6e60d88f0e22a048f343947c458cc3 Mon Sep 17 00:00:00 2001 From: kraxel Date: Tue, 13 Jun 2006 13:35:48 +0000 Subject: merge a bunch of fixed from Alan Curry --- fbtools.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'fbtools.c') 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)) -- cgit