]> git.ipfire.org Git - thirdparty/systemd.git/commit
udevadm: allow to specify device by device ID
authorYu Watanabe <watanabe.yu+github@gmail.com>
Tue, 27 May 2025 18:18:14 +0000 (03:18 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Wed, 28 May 2025 19:04:22 +0000 (04:04 +0900)
commitd0ba749e8c802ed8a96be3571b38fbad25fd772f
treef7a6277bcc3b8fcc815fd2bcdb484ecdf2d184ee
parent337f45d811bd17e3907d930521143da53e460c2e
udevadm: allow to specify device by device ID

We have already exposed device ID in the output of device ID in J
fields. Also sd_device_get_device_id() and sd_device_new_from_device_id()
are already public. Hence, making udevadm accept device IDs may be
useful.

With this change, as we save several data in /run/udev with device ID,
we can call udevadm something like the following:
```
udevadm info $(ls /run/udev/tags/uaccess)
```
Then, we can show all devices that has uaccess tag.
man/udevadm.xml
src/udev/udevadm-info.c
src/udev/udevadm-util.c
test/units/TEST-17-UDEV.sanity-check.sh
tools/command_ignorelist