vserver 1.9.5.x5
[linux-2.6.git] / drivers / char / vt_ioctl.c
index 2cd1770..ad3a5d3 100644 (file)
@@ -37,7 +37,7 @@ char vt_dont_switch;
 extern struct tty_driver *console_driver;
 
 #define VT_IS_IN_USE(i)        (console_driver->ttys[i] && console_driver->ttys[i]->count)
-#define VT_BUSY(i)     (VT_IS_IN_USE(i) || i == fg_console || i == sel_cons)
+#define VT_BUSY(i)     (VT_IS_IN_USE(i) || i == fg_console || vc_cons[i].d == sel_cons)
 
 /*
  * Console (vt and kd) routines, as defined by USL SVR4 manual, and by
@@ -100,7 +100,7 @@ do_kdsk_ioctl(int cmd, struct kbentry __user *user_kbe, int perm, struct kbd_str
                        /* disallocate map */
                        key_map = key_maps[s];
                        if (s && key_map) {
-                           key_maps[s] = 0;
+                           key_maps[s] = NULL;
                            if (key_map[0] == U(K_ALLOCATED)) {
                                        kfree(key_map);
                                        keymap_count--;
@@ -536,8 +536,7 @@ int vt_ioctl(struct tty_struct *tty, struct file * file,
                  default:
                        return -EINVAL;
                }
-               if (tty->ldisc.flush_buffer)
-                       tty->ldisc.flush_buffer(tty);
+               tty_ldisc_flush(tty);
                return 0;
 
        case KDGKBMODE:
@@ -915,7 +914,7 @@ int vt_ioctl(struct tty_struct *tty, struct file * file,
                op.width = 8;
                op.height = 0;
                op.charcount = 256;
-               op.data = (char *) arg;
+               op.data = up;
                return con_font_op(fg_console, &op);
        }
 
@@ -925,7 +924,7 @@ int vt_ioctl(struct tty_struct *tty, struct file * file,
                op.width = 8;
                op.height = 32;
                op.charcount = 256;
-               op.data = (char *) arg;
+               op.data = up;
                return con_font_op(fg_console, &op);
        }