chiark / gitweb /
bus: also take write queue into consideration in sd_bus_try_close()
[elogind.git] / src / udev / udev-builtin-keyboard.c
index ddd853594e96cd3792805fe7c35282143fb60e05..b510a42eb94810f575bdc63adeaeb70a3fe60fe7 100644 (file)
@@ -88,7 +88,7 @@ static int builtin_keyboard(struct udev_device *dev, int argc, char *argv[], boo
                         continue;
 
                 /* KEYBOARD_KEY_<hex scan code>=<key identifier string> */
-                scancode = strtol(key + 13, &endptr, 16);
+                scancode = strtoul(key + 13, &endptr, 16);
                 if (endptr[0] != '\0') {
                         log_error("Error, unable to parse scan code from '%s'\n", key);
                         continue;
@@ -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 */