Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

udevd does not store custom TAGS #228

Open
konradgraefe opened this issue May 10, 2022 · 1 comment
Open

udevd does not store custom TAGS #228

konradgraefe opened this issue May 10, 2022 · 1 comment

Comments

@konradgraefe
Copy link

konradgraefe commented May 10, 2022

Hello,

i have a rule tagging any device on a specific USB port with a custom tag:

TAGS=="CUSTOM_USB", \
    DEVPATH=="/devices/platform/ff340000.usb/usb1/1-1/1-1.2", \
    TAG+="CUSTOM_USB", \
    TAG+="CUSTOM_USB_EXT"

I also have a custom daemon listening for events with this tag using libudev. This works while processing the event but I cannot enumerate devices by the tag that were already connected before my daemon started.

Also udevadm info does not show the tags:

# udevadm info  /sys/devices/platform/ff340000.usb/usb1/1-1/1-1.2 | grep TAGS
#

After running udevadm test they are present and detection would work in my daemon:

# udevadm test /sys/devices/platform/ff340000.usb/usb1/1-1/1-1.2
[...]
# udevadm info  /sys/devices/platform/ff340000.usb/usb1/1-1/1-1.2 | grep TAGS
E: TAGS=:CUSTOM_USB:CUSTOM_USB_EXT:

Is that the desired behavior? Can I configure udevd to store the TAGS after evaluating my rules?

Please feel free to ask if you need any additional information.

@konradgraefe
Copy link
Author

Running udevadm trigger /sys/devices/platform/ff340000.usb/usb1/1-1/1-1.2 makes the tags permanent as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant