chiark / gitweb /
udev-builtin-keyboard: More useful error message
authorMartin Pitt <martinpitt@gnome.org>
Mon, 25 Nov 2013 16:44:57 +0000 (17:44 +0100)
committerMartin Pitt <martinpitt@gnome.org>
Mon, 25 Nov 2013 16:44:57 +0000 (17:44 +0100)
Make the "Error calling EVIOCSKEYCODE" error message more useful by mentioning
which scan/key code it tried to set.

src/udev/udev-builtin-keyboard.c

index 8f457ab..b510a42 100644 (file)
@@ -143,7 +143,7 @@ static int builtin_keyboard(struct udev_device *dev, int argc, char *argv[], boo
                         log_debug("keyboard: mapping scan code %d (0x%x) to key code %d (0x%x)\n",
                                   map[i].scan, map[i].scan, map[i].key, map[i].key);
                         if (ioctl(fd, EVIOCSKEYCODE, &map[i]) < 0)
-                                log_error("Error calling EVIOCSKEYCODE: %m\n");
+                                log_error("Error calling EVIOCSKEYCODE (scan code 0x%x, key code %d): %m\n", map[i].scan, map[i].key);
                 }
 
                 /* install list of force-release codes */