diff options
author | Kay Sievers <kay.sievers@vrfy.org> | 2010-12-01 20:51:05 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2010-12-17 03:15:34 +0300 |
commit | fbc92a3455577ab17615cbcb91826399061bd789 (patch) | |
tree | 0f47703d9d3b40969e007a6d27a1b603cdff43da /kernel/printk.c | |
parent | 35c64e5d13c3d7d8c4ad061ad5e20498b9160c24 (diff) | |
download | linux-fbc92a3455577ab17615cbcb91826399061bd789.tar.xz |
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
Diffstat (limited to 'kernel/printk.c')
-rw-r--r-- | kernel/printk.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/kernel/printk.c b/kernel/printk.c index bf0420a92a1a..5417784a76b5 100644 --- a/kernel/printk.c +++ b/kernel/printk.c @@ -1332,6 +1332,7 @@ void register_console(struct console *newcon) spin_unlock_irqrestore(&logbuf_lock, flags); } release_console_sem(); + console_sysfs_notify(); /* * By unregistering the bootconsoles after we enable the real console @@ -1390,6 +1391,7 @@ int unregister_console(struct console *console) console_drivers->flags |= CON_CONSDEV; release_console_sem(); + console_sysfs_notify(); return res; } EXPORT_SYMBOL(unregister_console); |