aboutsummaryrefslogtreecommitdiff
path: root/sys/kern/kern_cons.c
diff options
context:
space:
mode:
authorKyle Evans <kevans@FreeBSD.org>2019-12-26 15:47:19 +0000
committerKyle Evans <kevans@FreeBSD.org>2019-12-26 15:47:19 +0000
commitf46412c021efc761b9c313c1b3481e53d75e5e03 (patch)
tree9789ca65d6e3f28fa46bcae9f50af71e0b02d84a /sys/kern/kern_cons.c
parent3ed7166aca6c1450c2cc7ad58f3244c80dc08994 (diff)
downloadsrc-f46412c021efc761b9c313c1b3481e53d75e5e03.tar.gz
src-f46412c021efc761b9c313c1b3481e53d75e5e03.zip
kern_cons: add a stub kbdinit for configs with no keyboard/console drivers
A weak symbol here is decidedly cleaner than any #ifdef soup or relocating kbdinit, the former leading to maintenance required on addition of any console/keyboard drivers and the latter pushing kbd init bits away from where they're used.
Notes
Notes: svn path=/head/; revision=356088
Diffstat (limited to 'sys/kern/kern_cons.c')
-rw-r--r--sys/kern/kern_cons.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/sys/kern/kern_cons.c b/sys/kern/kern_cons.c
index 34d7de204227..70ef85f9aa43 100644
--- a/sys/kern/kern_cons.c
+++ b/sys/kern/kern_cons.c
@@ -110,6 +110,19 @@ static struct consdev cons_consdev;
DATA_SET(cons_set, cons_consdev);
SET_DECLARE(cons_set, struct consdev);
+/*
+ * Stub for configurations that don't actually have a keyboard driver. Inclusion
+ * of kbd.c is contingent on any number of keyboard/console drivers being
+ * present in the kernel; rather than trying to catch them all, we'll just
+ * maintain this weak kbdinit that will be overridden by the strong version in
+ * kbd.c if it's present.
+ */
+__weak_symbol void
+kbdinit(void)
+{
+
+}
+
void
cninit(void)
{