summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Pitt <martin.pitt@ubuntu.com>2009-12-03 10:22:04 +0100
committerMartin Pitt <martin.pitt@ubuntu.com>2009-12-03 10:22:04 +0100
commitb919e0ffee9356f34da1f94465e7235d30ceb154 (patch)
treefaef7921734232221e0ad994f4a38f85c6bdabf1
parent22f9cb51c39a6fef1109bfd24e97d2fdda327a9e (diff)
input_id: Do not tag non-input devices with ID_INPUT
Current rules only call it for input devices, but let's be correct.
-rw-r--r--extras/input_id/input_id.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/extras/input_id/input_id.c b/extras/input_id/input_id.c
index fededa3f7d..8024524681 100644
--- a/extras/input_id/input_id.c
+++ b/extras/input_id/input_id.c
@@ -146,6 +146,10 @@ int main (int argc, char** argv)
while (dev != NULL && udev_device_get_sysattr_value(dev, "capabilities/key") == NULL)
dev = udev_device_get_parent(dev);
+ /* not an "input" class device */
+ if (dev == NULL)
+ return 0;
+
/* Use this as a flag that input devices were detected, so that this
* program doesn't need to be called more than once per device */
puts("ID_INPUT=1");