diff options
author | Peter Hutterer <peter.hutterer@who-t.net> | 2013-10-08 13:09:50 +1000 |
---|---|---|
committer | Peter Hutterer <peter.hutterer@who-t.net> | 2013-10-23 09:04:41 +1000 |
commit | f9bdb66ab47bfce41ce6a4c17eb9d58f741117d6 (patch) | |
tree | 67c331ab9759077e7ebaf57058dcfb9a4ed1b72b | |
parent | caa9267290c51a32073fc0d12380164e7ac0792c (diff) |
When running against a kernel without properties, continue as usual
Missing out on properties is not fatal.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
-rw-r--r-- | libevdev/libevdev.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/libevdev/libevdev.c b/libevdev/libevdev.c index fd3c010..29640f4 100644 --- a/libevdev/libevdev.c +++ b/libevdev/libevdev.c @@ -267,8 +267,12 @@ libevdev_set_fd(struct libevdev* dev, int fd) if (rc < 0) goto out; + /* Built on a kernel with props, running against a kernel without property + support. This should not be a fatal case, we'll be missing properties but other + than that everything is as expected. + */ rc = ioctl(fd, EVIOCGPROP(sizeof(dev->props)), dev->props); - if (rc < 0) + if (rc < 0 && errno != EINVAL) goto out; rc = ioctl(fd, EVIOCGBIT(EV_REL, sizeof(dev->rel_bits)), dev->rel_bits); |