libudev: Get all sysfs attrs for a device
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest2 patches 7 repliesIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/2 | libudev: modify sysfs attr caching behaviorlibudev/ | +1 | 0 replies | |
| 2/2 | libudev: Get all sysfs attrs for a devicelibudev/ libudev/ libudev/ | +12 | 0 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [PATCH 0/2] libudev: Get all sysfs attrs for a device
Hi folks,
I recently took part in writing an application using libudev to retrieve information on devices present on a linux system. It became evident that apparently there is no way to retrieve all possible sysfs attributes for a particular device (the same way it is possible to get all of its properties). The matter kept nagging me -- even though we worked our way around this using sysfs directly -- and I decided to add a udev_device_get_sysattr_list_entry. For this matter the behavior of udev_device_get_sysattr_value had to be modified (a little): on first access of any sysattr, it create an list including _all_ sysfs-attributes as name (with an empty value, except for the symlinks). The values are cached as soon as thery're requested. Negative entries do not exist anymore.
Cheers, Thomas