diff options
Diffstat (limited to 'drivers/tty/vt')
-rw-r--r-- | drivers/tty/vt/keyboard.c | 2 | ||||
-rw-r--r-- | drivers/tty/vt/selection.c | 5 | ||||
-rw-r--r-- | drivers/tty/vt/vc_screen.c | 2 | ||||
-rw-r--r-- | drivers/tty/vt/vt.c | 13 | ||||
-rw-r--r-- | drivers/tty/vt/vt_ioctl.c | 25 |
5 files changed, 26 insertions, 21 deletions
diff --git a/drivers/tty/vt/keyboard.c b/drivers/tty/vt/keyboard.c index d6b342b5b42..3761ccf0f34 100644 --- a/drivers/tty/vt/keyboard.c +++ b/drivers/tty/vt/keyboard.c @@ -1,6 +1,4 @@ /* - * linux/drivers/char/keyboard.c - * * Written for linux by Johan Myreen as a translation from * the assembly version by Linus (with diacriticals added) * diff --git a/drivers/tty/vt/selection.c b/drivers/tty/vt/selection.c index adf0ad2a885..67b1d0d7c8a 100644 --- a/drivers/tty/vt/selection.c +++ b/drivers/tty/vt/selection.c @@ -1,6 +1,4 @@ /* - * linux/drivers/char/selection.c - * * This module exports the functions: * * 'int set_selection(struct tiocl_selection __user *, struct tty_struct *)' @@ -334,8 +332,7 @@ int paste_selection(struct tty_struct *tty) continue; } count = sel_buffer_lth - pasted; - count = min(count, tty->receive_room); - tty->ldisc->ops->receive_buf(tty, sel_buffer + pasted, + count = tty->ldisc->ops->receive_buf(tty, sel_buffer + pasted, NULL, count); pasted += count; } diff --git a/drivers/tty/vt/vc_screen.c b/drivers/tty/vt/vc_screen.c index 1564261e80c..66825c9f516 100644 --- a/drivers/tty/vt/vc_screen.c +++ b/drivers/tty/vt/vc_screen.c @@ -1,6 +1,4 @@ /* - * linux/drivers/char/vc_screen.c - * * Provide access to virtual console memory. * /dev/vcs0: the screen as it is being viewed right now (possibly scrolled) * /dev/vcsN: the screen of /dev/ttyN (1 <= N <= 63) diff --git a/drivers/tty/vt/vt.c b/drivers/tty/vt/vt.c index 4bea1efaec9..b3915b7ad3e 100644 --- a/drivers/tty/vt/vt.c +++ b/drivers/tty/vt/vt.c @@ -1,6 +1,4 @@ /* - * linux/drivers/char/vt.c - * * Copyright (C) 1991, 1992 Linus Torvalds */ @@ -858,7 +856,7 @@ static int vc_do_resize(struct tty_struct *tty, struct vc_data *vc, { unsigned long old_origin, new_origin, new_scr_end, rlth, rrem, err = 0; unsigned long end; - unsigned int old_cols, old_rows, old_row_size, old_screen_size; + unsigned int old_rows, old_row_size; unsigned int new_cols, new_rows, new_row_size, new_screen_size; unsigned int user; unsigned short *newscreen; @@ -887,9 +885,7 @@ static int vc_do_resize(struct tty_struct *tty, struct vc_data *vc, return -ENOMEM; old_rows = vc->vc_rows; - old_cols = vc->vc_cols; old_row_size = vc->vc_size_row; - old_screen_size = vc->vc_screenbuf_size; err = resize_screen(vc, new_cols, new_rows, user); if (err) { @@ -1197,6 +1193,13 @@ static void csi_J(struct vc_data *vc, int vpar) vc->vc_x + 1); } break; + case 3: /* erase scroll-back buffer (and whole display) */ + scr_memsetw(vc->vc_screenbuf, vc->vc_video_erase_char, + vc->vc_screenbuf_size >> 1); + set_origin(vc); + if (CON_IS_VISIBLE(vc)) + update_screen(vc); + /* fall through */ case 2: /* erase whole display */ count = vc->vc_cols * vc->vc_rows; start = (unsigned short *)vc->vc_origin; diff --git a/drivers/tty/vt/vt_ioctl.c b/drivers/tty/vt/vt_ioctl.c index 937d1721998..5e096f43bce 100644 --- a/drivers/tty/vt/vt_ioctl.c +++ b/drivers/tty/vt/vt_ioctl.c @@ -1,6 +1,4 @@ /* - * linux/drivers/char/vt_ioctl.c - * * Copyright (C) 1992 obz under the linux copyright * * Dynamic diacritical handling - aeb@cwi.nl - Dec 1993 @@ -698,10 +696,23 @@ int vt_ioctl(struct tty_struct *tty, break; case KDGKBMODE: - uival = ((kbd->kbdmode == VC_RAW) ? K_RAW : - (kbd->kbdmode == VC_MEDIUMRAW) ? K_MEDIUMRAW : - (kbd->kbdmode == VC_UNICODE) ? K_UNICODE : - K_XLATE); + switch (kbd->kbdmode) { + case VC_RAW: + uival = K_RAW; + break; + case VC_MEDIUMRAW: + uival = K_MEDIUMRAW; + break; + case VC_UNICODE: + uival = K_UNICODE; + break; + case VC_OFF: + uival = K_OFF; + break; + default: + uival = K_XLATE; + break; + } goto setint; /* this could be folded into KDSKBMODE, but for compatibility @@ -1499,7 +1510,6 @@ long vt_compat_ioctl(struct tty_struct *tty, { struct vc_data *vc = tty->driver_data; struct console_font_op op; /* used in multiple places here */ - struct kbd_struct *kbd; unsigned int console; void __user *up = (void __user *)arg; int perm; @@ -1522,7 +1532,6 @@ long vt_compat_ioctl(struct tty_struct *tty, if (current->signal->tty == tty || capable(CAP_SYS_TTY_CONFIG)) perm = 1; - kbd = kbd_table + console; switch (cmd) { /* * these need special handlers for incompatible data structures |