]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
udev: add ID_INPUT_SWITCH for devices with switch capability (#5057)
authorPeter Hutterer <peter.hutterer@who-t.net>
Tue, 10 Jan 2017 07:36:46 +0000 (17:36 +1000)
committerMartin Pitt <martin.pitt@ubuntu.com>
Tue, 10 Jan 2017 07:36:46 +0000 (08:36 +0100)
src/udev/udev-builtin-input_id.c

index 59b9804dc4b10d7f72550c532bc9643966ba17ee..51f364bf94fd027f0ed8c32ec636f1811522e786 100644 (file)
@@ -323,6 +323,9 @@ static int builtin_input_id(struct udev_device *dev, int argc, char *argv[], boo
                 if (!is_pointer && !is_key && test_bit(EV_REL, bitmask_ev) &&
                     (test_bit(REL_WHEEL, bitmask_rel) || test_bit(REL_HWHEEL, bitmask_rel)))
                         udev_builtin_add_property(dev, test, "ID_INPUT_KEY", "1");
+                if (test_bit(EV_SW, bitmask_ev))
+                        udev_builtin_add_property(dev, test, "ID_INPUT_SWITCH", "1");
+
         }
 
         devnode = udev_device_get_devnode(dev);