diff options
author | Jean-Sébastien Pédron <dumbbell@FreeBSD.org> | 2014-08-27 10:04:10 +0000 |
---|---|---|
committer | Jean-Sébastien Pédron <dumbbell@FreeBSD.org> | 2014-08-27 10:04:10 +0000 |
commit | 3e206539a1c27b568b2f6eb920a1e896bb4352f3 (patch) | |
tree | b4b94c65a9dcc48b0b4ea1d3e013a76b1e792fad /sys/kern/subr_terminal.c | |
parent | d3773c6e8ecd519c985b1647534d970dde3b166d (diff) | |
download | src-3e206539a1c27b568b2f6eb920a1e896bb4352f3.tar.gz src-3e206539a1c27b568b2f6eb920a1e896bb4352f3.zip |
vt(4): Add cngrab() and cnungrab() callbacks
They are used when a panic occurs or when entering a DDB session for
instance.
cngrab() forces a vt-switch to the console window, no matter if the
original window is another terminal or an X session. However, cnungrab()
doesn't vt-switch back to the original window currently.
MFC after: 1 week
Notes
Notes:
svn path=/head/; revision=270705
Diffstat (limited to 'sys/kern/subr_terminal.c')
-rw-r--r-- | sys/kern/subr_terminal.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/sys/kern/subr_terminal.c b/sys/kern/subr_terminal.c index d8d1836d55fa..69345df56ca6 100644 --- a/sys/kern/subr_terminal.c +++ b/sys/kern/subr_terminal.c @@ -476,13 +476,17 @@ termcn_cnregister(struct terminal *tm) static void termcn_cngrab(struct consdev *cp) { + struct terminal *tm = cp->cn_arg; + tm->tm_class->tc_cngrab(tm); } static void termcn_cnungrab(struct consdev *cp) { + struct terminal *tm = cp->cn_arg; + tm->tm_class->tc_cnungrab(tm); } static void |