diff options
author | kraxel <kraxel> | 2006-06-13 13:35:48 +0000 |
---|---|---|
committer | kraxel <kraxel> | 2006-06-13 13:35:48 +0000 |
commit | 8992ff2c2c6e60d88f0e22a048f343947c458cc3 (patch) | |
tree | cce54e530a1f4c7c9a44e876ab9ce28a955e5ca7 /fbtools.c | |
parent | 34eca660e8d21ada08c150e0d6e8ed048e1ab380 (diff) | |
download | fbida-8992ff2c2c6e60d88f0e22a048f343947c458cc3.tar.gz |
merge a bunch of fixed from Alan Curry
Diffstat (limited to 'fbtools.c')
-rw-r--r-- | fbtools.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -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)) |