[systemd-devel] libudev: howto enumerate subdirectories of a device

Doug Goldstein cardoe at gentoo.org
Thu Oct 4 21:01:00 PDT 2012


I've got code that provides me a udev_device that is a bridge device
(e.g. /sys/devices/virtual/net/br0/).
udev_device_get_sysattr_list_entry() returns me all of the items in
that top level directory but nothing in any of the subdirectories. I
can however use udev_device_get_sysattr_value(udev_dev,
"bridge/stp_state") for example to get back data. So I've got two
questions:

1. I really want a way to enumerate all the possible fields inside of
/sys/devices/virtual/net/br0/bridge/.

2. I'm trying to figure out how to get a list of devices that are
attached to the bridge which appear under
/sys/devices/virtual/net/br0/brif/.

Thanks for any suggestions or help.
-- 
Doug Goldstein


More information about the systemd-devel mailing list