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:
parent
3d7b2831cd
commit
56c141eceb
@ -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
|
||||
|
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user