Commit 8a8e9c88 authored by Andrew Morton's avatar Andrew Morton Committed by Linus Torvalds

[PATCH] add vt console scrollback ioctl

From: Samuel Thibault <Samuel.Thibault@ens-lyon.fr>

There is no way for a braille device driven by brltty (userland root-owned
daemon) to scrollback the virtual console, the only way is to use the pc
keyboard.  A very simple TIOCLINUX ioctl meets this need (tested).

Also add a command for bringing the last console to the top, as keyboard.c's
lastcons() does when pressing alt - down arrow.
parent 3bc17e74
......@@ -1313,6 +1313,9 @@ static void setterm_command(int currcons)
case 14: /* set vesa powerdown interval */
vesa_off_interval = ((par[1] < 60) ? par[1] : 60) * 60 * HZ;
break;
case 15: /* Activate the previous console */
set_console(last_console);
break;
}
}
......@@ -2210,6 +2213,7 @@ struct console vt_console_driver = {
int tioclinux(struct tty_struct *tty, unsigned long arg)
{
char type, data;
int lines;
int ret;
if (tty->driver.type != TTY_DRIVER_TYPE_CONSOLE)
......@@ -2266,6 +2270,14 @@ int tioclinux(struct tty_struct *tty, unsigned long arg)
case 12: /* get fg_console */
ret = fg_console;
break;
case 13: /* scroll console */
if (get_user(lines, (char *)arg+1)) {
ret = -EFAULT;
} else {
scrollfront(lines);
ret = 0;
}
break;
default:
ret = -EINVAL;
break;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment