From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas Egerer Date: Thu, 03 Mar 2011 09:17:26 +0000 Subject: [PATCH 0/2] libudev: Get all sysfs attrs for a device Message-Id: <4D6F5CA6.2010905@secunet.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: linux-hotplug@vger.kernel.org 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