mirror of
https://github.com/systemd/systemd.git
synced 2025-02-14 05:57:40 +03:00
keymap: continue reading keymap after invalid scancodes
Reading of keymaps is aborted when EINVAL is returned from EVIOCGETKEYCODE. Scan codes are not always continuous ranges of values starting at 0, so this can result in not getting the full keymap for a device. Instead, continue processing if EINVAL is returned.
This commit is contained in:
parent
864fde8a08
commit
641842bce2
@ -141,8 +141,9 @@ static int dump_table(int fd) {
|
||||
int keycode;
|
||||
|
||||
if ((keycode = evdev_get_keycode(fd, scancode, 1)) < 0) {
|
||||
if (keycode != -2)
|
||||
r = -1;
|
||||
if (keycode == -2)
|
||||
continue;
|
||||
r = -1;
|
||||
break;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user