diff --git a/src/evdev.c b/src/evdev.c index 7c91cd8..b8a6a95 100644 --- a/src/evdev.c +++ b/src/evdev.c @@ -16,8 +16,8 @@ int evdev_is_keyboard(const char *devnode) { int fd = open(devnode, O_RDONLY); if (fd < 0) { - perror("open"); - exit(-1); + fprintf(stderr, "is_keyboard: Failed to open %s\n", devnode); + return 0; } uint8_t keymask[(KEY_CNT+7)/8]; @@ -96,7 +96,7 @@ const char *evdev_device_name(const char *devnode) int fd = open(devnode, O_RDONLY); if (fd < 0) { - perror("open"); + perror("open name"); exit(-1); } diff --git a/src/vkbd/uinput.c b/src/vkbd/uinput.c index 5f3a5e6..b510f49 100644 --- a/src/vkbd/uinput.c +++ b/src/vkbd/uinput.c @@ -19,7 +19,7 @@ static int create_virtual_keyboard(const char *name) int fd = open("/dev/uinput", O_WRONLY | O_NONBLOCK); if (fd < 0) { - perror("open"); + perror("open uinput"); exit(-1); }