path: root/sys/sys
diff options
authorJean-Sébastien Pédron <dumbbell@FreeBSD.org>2014-08-27 10:04:10 +0000
committerJean-Sébastien Pédron <dumbbell@FreeBSD.org>2014-08-27 10:04:10 +0000
commit3e206539a1c27b568b2f6eb920a1e896bb4352f3 (patch)
treeb4b94c65a9dcc48b0b4ea1d3e013a76b1e792fad /sys/sys
parentd3773c6e8ecd519c985b1647534d970dde3b166d (diff)
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: svn path=/head/; revision=270705
Diffstat (limited to 'sys/sys')
1 files changed, 7 insertions, 0 deletions
diff --git a/sys/sys/terminal.h b/sys/sys/terminal.h
index 15641dcc634d..133332f4b944 100644
--- a/sys/sys/terminal.h
+++ b/sys/sys/terminal.h
@@ -155,6 +155,9 @@ typedef void tc_done_t(struct terminal *tm);
typedef void tc_cnprobe_t(struct terminal *tm, struct consdev *cd);
typedef int tc_cngetc_t(struct terminal *tm);
+typedef void tc_cngrab_t(struct terminal *tm);
+typedef void tc_cnungrab_t(struct terminal *tm);
typedef void tc_opened_t(struct terminal *tm, int opened);
typedef int tc_ioctl_t(struct terminal *tm, u_long cmd, caddr_t data,
struct thread *td);
@@ -175,6 +178,10 @@ struct terminal_class {
tc_cnprobe_t *tc_cnprobe;
tc_cngetc_t *tc_cngetc;
+ /* DDB & panic handling. */
+ tc_cngrab_t *tc_cngrab;
+ tc_cnungrab_t *tc_cnungrab;
/* Misc. */
tc_opened_t *tc_opened;
tc_ioctl_t *tc_ioctl;