tty: add 'active' sysfs attribute to tty0 and console device
authorKay Sievers <kay.sievers@vrfy.org>
Wed, 1 Dec 2010 17:51:05 +0000 (18:51 +0100)
committerGreg Kroah-Hartman <gregkh@suse.de>
Fri, 17 Dec 2010 00:15:34 +0000 (16:15 -0800)
commitfbc92a3455577ab17615cbcb91826399061bd789
tree0f47703d9d3b40969e007a6d27a1b603cdff43da
parent35c64e5d13c3d7d8c4ad061ad5e20498b9160c24
tty: add 'active' sysfs attribute to tty0 and console device

tty: add 'active' sysfs attribute to tty0 and console device

Userspace can query the actual virtual console, and the configured
console devices behind /dev/tt0 and /dev/console.

The last entry in the list of devices is the active device, analog
to the console= kernel command line option.

The attribute supports poll(), which is raised when the virtual
console is changed or /dev/console is reconfigured.

Signed-off-by: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

index 0000000..b138b66
Documentation/ABI/testing/sysfs-tty [new file with mode: 0644]
drivers/tty/tty_io.c
drivers/tty/vt/vt.c
include/linux/console.h
kernel/printk.c