summaryrefslogtreecommitdiffstats
path: root/sys/kern/tty_cons.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/kern/tty_cons.c')
-rw-r--r--sys/kern/tty_cons.c18
1 files changed, 17 insertions, 1 deletions
diff --git a/sys/kern/tty_cons.c b/sys/kern/tty_cons.c
index bac3312..32656f8 100644
--- a/sys/kern/tty_cons.c
+++ b/sys/kern/tty_cons.c
@@ -97,7 +97,7 @@ static d_open_t *cn_phys_open; /* physical device open function */
struct consdev *cn_tab; /* physical console device info */
static dev_t condev_t; /* represents the device private info */
-CONS_DRIVER(cons, NULL, NULL, NULL, NULL, NULL, NULL);
+CONS_DRIVER(cons, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
void
cninit()
@@ -423,6 +423,22 @@ cnputc(c)
}
}
+void
+cndbctl(on)
+ int on;
+{
+ static int refcount;
+
+ if (cn_tab == NULL)
+ return;
+ if (!on)
+ refcount--;
+ if (refcount == 0 && cn_tab->cn_dbctl != NULL)
+ (*cn_tab->cn_dbctl)(cn_tab->cn_dev, on);
+ if (on)
+ refcount++;
+}
+
static void
cn_drvinit(void *unused)
{
OpenPOWER on IntegriCloud