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

Proposed by Seth Forshee
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) Approve
Review via email: mp+54564@code.launchpad.net

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.
Revision history for this message
Martin Pitt (pitti) wrote :

Thanks!

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
Revision history for this message
Martin Pitt (pitti) wrote :

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

Revision history for this message
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?

Revision history for this message
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 http://git.kernel.org/?p=linux/hotplug/udev.git in this case, and attach them to bugs or send a mail to <email address hidden>.

Revision history for this message
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
=== modified file 'extras/keymap/keymap.c'
--- extras/keymap/keymap.c 2011-01-16 20:12:32 +0000
+++ extras/keymap/keymap.c 2011-03-23 17:04:29 +0000
@@ -141,8 +141,9 @@
141 int keycode;141 int keycode;
142142
143 if ((keycode = evdev_get_keycode(fd, scancode, 1)) < 0) {143 if ((keycode = evdev_get_keycode(fd, scancode, 1)) < 0) {
144 if (keycode != -2)144 if (keycode == -2)
145 r = -1;145 continue;
146 r = -1;
146 break;147 break;
147 }148 }
148149

Subscribers

People subscribed via source and target branches

to all changes: