Better errors...
This commit is contained in:
parent
356c16ae20
commit
3cafd384a0
1 changed files with 4 additions and 2 deletions
|
|
@ -2,7 +2,6 @@
|
|||
#include <signal.h>
|
||||
#include <unistd.h>
|
||||
#include <string.h>
|
||||
#include <unistd.h>
|
||||
#include <fcntl.h>
|
||||
#include <errno.h>
|
||||
#include <termios.h>
|
||||
|
|
@ -28,7 +27,10 @@ static struct libevdev* ev_matches(const char* sysfs_entry, const uinput_filters
|
|||
return NULL;
|
||||
}
|
||||
|
||||
if (strcmp(libevdev_get_name(dev), filters->name) != 0) {
|
||||
const char* name = libevdev_get_name(dev);
|
||||
if (strcmp(name, filters->name) != 0) {
|
||||
fprintf(stderr, "The device name (%s) for device %s does not matches the expected one %s.\n", name, sysfs_entry, filters->name);
|
||||
libevdev_free(dev);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue