1
0
mirror of https://github.com/systemd/systemd.git synced 2025-01-27 18:04:05 +03:00

libudev: test - add udev_device_get_property_value()

This commit is contained in:
Kay Sievers 2009-01-06 16:52:40 +01:00
parent 3d7b2831cd
commit 56c141eceb
2 changed files with 5 additions and 1 deletions

View File

@ -29,7 +29,7 @@ udev_device_get_subsystem
udev_device_get_devtype
udev_device_get_devlinks_list_entry
udev_device_get_properties_list_entry
udev_device_get_properties_value
udev_device_get_property_value
udev_device_get_action
udev_device_get_driver
udev_device_get_devnum

View File

@ -101,6 +101,10 @@ static void print_device(struct udev_device *device)
if (count > 0)
printf("found %i properties\n", count);
str = udev_device_get_property_value(device, "MAJOR");
if (str != NULL)
printf("MAJOR: '%s'\n", str);
str = udev_device_get_sysattr_value(device, "dev");
if (str != NULL)
printf("attr{dev}: '%s'\n", str);