Better printf
This commit is contained in:
parent
1978cefab3
commit
cae2289d99
2 changed files with 3 additions and 3 deletions
|
|
@ -107,11 +107,11 @@ int dev_evdev_open(
|
||||||
}
|
}
|
||||||
|
|
||||||
if (libevdev_new_from_fd(fd, &out_evdev) != 0) {
|
if (libevdev_new_from_fd(fd, &out_evdev) != 0) {
|
||||||
fprintf(stderr, "Cannot initialize libevdev from this device (%s): skipping.\n", path);
|
fprintf(stderr, "Cannot initialize libevdev from this device (%s) -- Skipping.\n", path);
|
||||||
close(fd);
|
close(fd);
|
||||||
continue;
|
continue;
|
||||||
} else {
|
} else {
|
||||||
printf("Acquired evdev device %d", fd);
|
printf("Acquired evdev device %s: fd=%d", path, fd);
|
||||||
}
|
}
|
||||||
|
|
||||||
// try to open the device
|
// try to open the device
|
||||||
|
|
|
||||||
2
dev_in.c
2
dev_in.c
|
|
@ -241,7 +241,7 @@ void* dev_in_thread_func(void *ptr) {
|
||||||
} else if (devices[i].type == DEV_IN_TYPE_IIO) {
|
} else if (devices[i].type == DEV_IN_TYPE_IIO) {
|
||||||
|
|
||||||
} else if (devices[i].type == DEV_IN_TYPE_NONE) {
|
} else if (devices[i].type == DEV_IN_TYPE_NONE) {
|
||||||
fprintf(stderr, "Device %zu not found -- Attempt reconnection", i);
|
fprintf(stderr, "Device %zu not found -- Attempt reconnection\n", i);
|
||||||
|
|
||||||
if (devs->input_dev_decl[i].dev_type == input_dev_type_uinput) {
|
if (devs->input_dev_decl[i].dev_type == input_dev_type_uinput) {
|
||||||
const int open_res = open_device(&devs->input_dev_decl[i].filters.ev, &devices[i].dev.evdev);
|
const int open_res = open_device(&devs->input_dev_decl[i].filters.ev, &devices[i].dev.evdev);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue