From 8040f94637f3682457ef202008707ab045f21c3b Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Wed, 12 Feb 2020 16:51:29 +1000 Subject: [PATCH] udev: directly import the device groups No need for the indirection of PROGRAM, then ENV for the output value. Signed-off-by: Peter Hutterer --- udev/80-libinput-device-groups.rules.in | 5 +---- 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: