From 99a786979612068d319cfdef95b560e46913e03e Mon Sep 17 00:00:00 2001 From: Raheman Vaiya Date: Wed, 20 Jul 2022 03:58:31 -0400 Subject: [PATCH] Increase debug verbosity --- src/device.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/device.c b/src/device.c index da8b0db..e8bb3e0 100644 --- a/src/device.c +++ b/src/device.c @@ -83,14 +83,16 @@ static int device_init(const char *path, struct device *dev) type = resolve_device_type(fd); + if (ioctl(fd, EVIOCGNAME(sizeof(dev->name)), dev->name) == -1) { + perror("ioctl EVIOCGNAME"); + return -1; + } + + dbg2("device type of %s (%s): %x", path, dev->name, type); + if (type) { struct input_id info; - if (ioctl(fd, EVIOCGNAME(sizeof(dev->name)), dev->name) == -1) { - perror("ioctl EVIOCGNAME"); - return -1; - } - if (ioctl(fd, EVIOCGID, &info) == -1) { perror("ioctl EVIOCGID"); return -1;