diff options
author | emax <emax@FreeBSD.org> | 2006-02-25 22:59:01 +0000 |
---|---|---|
committer | emax <emax@FreeBSD.org> | 2006-02-25 22:59:01 +0000 |
commit | 916bbb145fe045ac718655f54ac73c1f93bdce51 (patch) | |
tree | b47207aadec84b5b2ad7a237a07daa7c89d0d796 | |
parent | ae16ca85eb8406e87f28dc038a318cec6423539c (diff) | |
download | FreeBSD-src-916bbb145fe045ac718655f54ac73c1f93bdce51.zip FreeBSD-src-916bbb145fe045ac718655f54ac73c1f93bdce51.tar.gz |
Put a comment, explaining why kbdmux(4) had to be fixed.
While I'm here fix a couple of whitespaces.
Requested by: netchild
MFC after: 1 day
-rw-r--r-- | sys/dev/kbdmux/kbdmux.c | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/sys/dev/kbdmux/kbdmux.c b/sys/dev/kbdmux/kbdmux.c index 844baa7..3080cf2 100644 --- a/sys/dev/kbdmux/kbdmux.c +++ b/sys/dev/kbdmux/kbdmux.c @@ -246,7 +246,16 @@ kbdmux_kbd_event(keyboard_t *kbd, int event, void *arg) KBDMUX_LOCK(state); - /* read all chars from the keyboard */ + /* + * Read all chars from the keyboard + * + * Turns out that atkbd(4) check_char() method may return + * "true" while read_char() method returns NOKEY. If this + * happens we could stuck in the loop below. Avoid this + * by breaking out of the loop if read_char() method returns + * NOKEY. + */ + while (KBDMUX_CHECK_CHAR(kbd)) { c = KBDMUX_READ_CHAR(kbd, 0); if (c == NOKEY) @@ -1128,8 +1137,8 @@ kbdmux_ioctl(keyboard_t *kbd, u_long cmd, caddr_t arg) break; case PIO_KEYMAP: /* set keyboard translation table */ - case PIO_KEYMAPENT: /* set keyboard translation table entry */ - case PIO_DEADKEYMAP: /* set accent key translation table */ + case PIO_KEYMAPENT: /* set keyboard translation table entry */ + case PIO_DEADKEYMAP: /* set accent key translation table */ KBDMUX_LOCK(state); state->ks_accents = 0; |