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.
This commit is contained in:
Kyle Evans 2019-12-26 15:47:19 +00:00
parent 3ed7166aca
commit f46412c021
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=356088

View File

@ -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)
{