Skip to content

libudev: Get all sysfs attrs for a device

Thomas Egerer linux-hotplug 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 7 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2libudev: modify sysfs attr caching behaviorlibudev/libudev-device.c+1 -00 replies
2/2libudev: Get all sysfs attrs for a devicelibudev/exported_symbols libudev/libudev-device.c libudev/libudev.h+12 -00 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

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