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>
This commit is contained in:
Peter Hutterer 2020-02-12 16:51:29 +10:00
parent 19898eb2b2
commit 8040f94637
2 changed files with 2 additions and 5 deletions

View file

@ -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"

View file

@ -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: