Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 26 Dec 2019 15:47:19 +0000 (UTC)
From:      Kyle Evans <kevans@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r356088 - head/sys/kern
Message-ID:  <201912261547.xBQFlJvZ015466@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: kevans
Date: Thu Dec 26 15:47:19 2019
New Revision: 356088
URL: https://svnweb.freebsd.org/changeset/base/356088

Log:
  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.

Modified:
  head/sys/kern/kern_cons.c

Modified: head/sys/kern/kern_cons.c
==============================================================================
--- head/sys/kern/kern_cons.c	Thu Dec 26 15:21:34 2019	(r356087)
+++ head/sys/kern/kern_cons.c	Thu Dec 26 15:47:19 2019	(r356088)
@@ -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)
 {



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201912261547.xBQFlJvZ015466>