diff options
author | Peter Hutterer <peter.hutterer@who-t.net> | 2020-02-12 16:51:29 +1000 |
---|---|---|
committer | Peter Hutterer <peter.hutterer@who-t.net> | 2020-02-12 19:23:36 +1000 |
commit | 8040f94637f3682457ef202008707ab045f21c3b (patch) | |
tree | 4d01bcca7408491402c694f84151e81a178f8a54 | |
parent | 19898eb2b2f74b3a4b2382765f33a5ee257a9b03 (diff) | |
download | libinput-8040f94637f3682457ef202008707ab045f21c3b.tar.gz |
udev: directly import the device groups
No need for the indirection of PROGRAM, then ENV for the output value.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
-rw-r--r-- | udev/80-libinput-device-groups.rules.in | 5 | ||||
-rw-r--r-- | udev/libinput-device-group.c | 2 |
2 files changed, 2 insertions, 5 deletions
diff --git a/udev/80-libinput-device-groups.rules.in b/udev/80-libinput-device-groups.rules.in index 1a26f783..f8331530 100644 --- a/udev/80-libinput-device-groups.rules.in +++ b/udev/80-libinput-device-groups.rules.in @@ -1,9 +1,6 @@ ACTION!="add|change", GOTO="libinput_device_group_end" KERNEL!="event[0-9]*", GOTO="libinput_device_group_end" -ATTRS{phys}=="?*", \ - ENV{LIBINPUT_DEVICE_GROUP}=="", \ - PROGRAM="@UDEV_TEST_PATH@libinput-device-group %S%p", \ - ENV{LIBINPUT_DEVICE_GROUP}="%c" +ATTRS{phys}=="?*", IMPORT{program}+="@UDEV_TEST_PATH@libinput-device-group %S%p" LABEL="libinput_device_group_end" diff --git a/udev/libinput-device-group.c b/udev/libinput-device-group.c index 46348e00..65d22ec3 100644 --- a/udev/libinput-device-group.c +++ b/udev/libinput-device-group.c @@ -247,7 +247,7 @@ int main(int argc, char **argv) if (str && str > strrchr(group, '-')) *str = '\0'; - printf("%s\n", group); + printf("LIBINPUT_DEVICE_GROUP=%s\n", group); rc = 0; out: |