mirror of
https://github.com/opnsense/src.git
synced 2026-05-28 04:12:45 -04:00
Fix for FAIL_IF_NO_KBD case as expected.
Even if we have no AT keyboard, an AT keyboard is registered because it's probed with KB_CONF_PROBE_ONLY flag set during console initialization. Unregister the keyboard if it doesn't present while second probe. This should fix USB keyboard only case without 'kbdcontrol -k /dev/kbd1'.
This commit is contained in:
parent
81e25c5eb2
commit
8ce4e5189e
2 changed files with 6 additions and 2 deletions
|
|
@ -417,8 +417,10 @@ atkbd_init(int unit, keyboard_t **kbdp, void *arg, int flags)
|
|||
kbd->kb_config = flags & ~KB_CONF_PROBE_ONLY;
|
||||
if (KBD_HAS_DEVICE(kbd)
|
||||
&& init_keyboard(state->kbdc, &kbd->kb_type, kbd->kb_config)
|
||||
&& (kbd->kb_config & KB_CONF_FAIL_IF_NO_KBD))
|
||||
&& (kbd->kb_config & KB_CONF_FAIL_IF_NO_KBD)) {
|
||||
kbd_unregister(kbd);
|
||||
return ENXIO;
|
||||
}
|
||||
atkbd_ioctl(kbd, KDSETLED, (caddr_t)&state->ks_state);
|
||||
get_typematic(kbd);
|
||||
delay[0] = kbd->kb_delay1;
|
||||
|
|
|
|||
|
|
@ -417,8 +417,10 @@ atkbd_init(int unit, keyboard_t **kbdp, void *arg, int flags)
|
|||
kbd->kb_config = flags & ~KB_CONF_PROBE_ONLY;
|
||||
if (KBD_HAS_DEVICE(kbd)
|
||||
&& init_keyboard(state->kbdc, &kbd->kb_type, kbd->kb_config)
|
||||
&& (kbd->kb_config & KB_CONF_FAIL_IF_NO_KBD))
|
||||
&& (kbd->kb_config & KB_CONF_FAIL_IF_NO_KBD)) {
|
||||
kbd_unregister(kbd);
|
||||
return ENXIO;
|
||||
}
|
||||
atkbd_ioctl(kbd, KDSETLED, (caddr_t)&state->ks_state);
|
||||
get_typematic(kbd);
|
||||
delay[0] = kbd->kb_delay1;
|
||||
|
|
|
|||
Loading…
Reference in a new issue