Merge lp:~sforshee/udev/keymap-continue-read-after-invalid-scancode into lp:udev

Proposed by Seth Forshee on 2011-03-23
Status: Merged
Merge reported by: Seth Forshee
Merged at revision: not available
Proposed branch: lp:~sforshee/udev/keymap-continue-read-after-invalid-scancode
Merge into: lp:udev
Diff against target: 14 lines (+3/-2)
1 file modified
extras/keymap/keymap.c (+3/-2)
To merge this branch: bzr merge lp:~sforshee/udev/keymap-continue-read-after-invalid-scancode
Reviewer Review Type Date Requested Status
Martin Pitt (community) 2011-03-23 Approve on 2011-03-24
Review via email:

Description of the change

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.

To post a comment you must log in.
Martin Pitt (pitti) wrote :


lp:udev is an automatic import from upstream git, I can't merge into it directly. I extracted the patch and applied it to upstream git, thanks!

review: Approve
Martin Pitt (pitti) wrote :

Unfortunately I cannot change the status of this, can you please set it to "merged"?

Seth Forshee (sforshee) wrote :

Okay, set status to merged.

If this can't be merged directly, is doing the merge request through launchpad the right way to submit changes, or should I be doing it some other way?

Martin Pitt (pitti) wrote :

If you prefer working in bzr, it is certainly a working way. It's about the same effort as attaching a patch to a bug report (except that I can't modify the status of non-Ubuntu merge proposals).

The best/canonical way would be to supply format-patches or branches against the upstream branch, which is in this case, and attach them to bugs or send a mail to <email address hidden>.

Seth Forshee (sforshee) wrote :

Well, being a kernel guy I'm way more comfortable with git, so I'll do it that way in the future!

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'extras/keymap/keymap.c'
2--- extras/keymap/keymap.c 2011-01-16 20:12:32 +0000
3+++ extras/keymap/keymap.c 2011-03-23 17:04:29 +0000
4@@ -141,8 +141,9 @@
5 int keycode;
7 if ((keycode = evdev_get_keycode(fd, scancode, 1)) < 0) {
8- if (keycode != -2)
9- r = -1;
10+ if (keycode == -2)
11+ continue;
12+ r = -1;
13 break;
14 }


People subscribed via source and target branches

to all changes: