#include <libudev.h>
On success, udev_device_get_devnum() returns the device type of the passed device. On failure, a device type with minor and major number set to 0 is returned.
udev_device_get_udev() always returns a valid pointer to the udev context that this device belongs to.
On success, udev_device_get_parent() and udev_device_get_parent_with_subsystem_devtype() return a pointer to the parent device. No additional reference to this device is acquired, but the child device owns a reference to such a parent device. On failure, NULL is returned.
On success, udev_device_get_is_initialized() returns either 1 or 0, depending on whether the passed device has already been initialized by udev or not. On failure, a negative error code is returned. Note that devices for which no udev rules are defined are never reported initialized.
udev_new(3), udev_device_new_from_syspath(3), udev_device_has_tag(3), udev_enumerate_new(3), udev_monitor_new_from_netlink(3), udev_list_entry(3), systemd(1)