diff options
author | Peter Hutterer <peter.hutterer@who-t.net> | 2018-05-24 11:56:24 +1000 |
---|---|---|
committer | Peter Hutterer <peter.hutterer@who-t.net> | 2018-06-08 14:37:22 +1000 |
commit | 639ed0b641749dc836d5808e4f189b032701b904 (patch) | |
tree | ceb74afcf6ce155ed680f3506234535a3b8c3429 /test/test-switch.c | |
parent | 33341ddd20103f0ac447ec4beabe17463af89ca9 (diff) |
Switch from udev property parsing to the quirks system
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Diffstat (limited to 'test/test-switch.c')
-rw-r--r-- | test/test-switch.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/test/test-switch.c b/test/test-switch.c index 74cb43e0..043a8e3a 100644 --- a/test/test-switch.c +++ b/test/test-switch.c @@ -143,16 +143,15 @@ END_TEST static bool lid_switch_is_reliable(struct litest_device *dev) { - struct udev_device *udev_device; - const char *prop; + char *prop; bool is_reliable = false; - udev_device = libinput_device_get_udev_device(dev->libinput_device); - prop = udev_device_get_property_value(udev_device, - "LIBINPUT_ATTR_LID_SWITCH_RELIABILITY"); + if (quirks_get_string(dev->quirks, + QUIRK_ATTR_LID_SWITCH_RELIABILITY, + &prop)) { + is_reliable = streq(prop, "reliable"); + } - is_reliable = prop && streq(prop, "reliable"); - udev_device_unref(udev_device); return is_reliable; } |