Improve logging

master
Raheman Vaiya 4 years ago
parent 0a5a80e6dc
commit d2e8eda35b
  1. 6
      src/evdev.c
  2. 2
      src/vkbd/uinput.c

@ -16,8 +16,8 @@ int evdev_is_keyboard(const char *devnode)
{ {
int fd = open(devnode, O_RDONLY); int fd = open(devnode, O_RDONLY);
if (fd < 0) { if (fd < 0) {
perror("open"); fprintf(stderr, "is_keyboard: Failed to open %s\n", devnode);
exit(-1); return 0;
} }
uint8_t keymask[(KEY_CNT+7)/8]; 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); int fd = open(devnode, O_RDONLY);
if (fd < 0) { if (fd < 0) {
perror("open"); perror("open name");
exit(-1); exit(-1);
} }

@ -19,7 +19,7 @@ static int create_virtual_keyboard(const char *name)
int fd = open("/dev/uinput", O_WRONLY | O_NONBLOCK); int fd = open("/dev/uinput", O_WRONLY | O_NONBLOCK);
if (fd < 0) { if (fd < 0) {
perror("open"); perror("open uinput");
exit(-1); exit(-1);
} }

Loading…
Cancel
Save