udev_device_new_from_devnum

Function udev_device_new_from_devnum 

Source
pub fn udev_device_new_from_devnum(
    udev: Arc<Udev>,
    devtype: &str,
    devnum: dev_t,
) -> Result<UdevDevice>
Expand description

Creates new UdevDevice.

From the libudev documentation:

Fills in information from the `sys` device and the udev database entry.

The device is looked-up by its major/minor number and type. Character and block device
numbers are not unique across the two types.

Parameters:

  • udev: Udev library context
  • type: char or block device
  • devnum: device major/minor number

Returns: a new UdevDevice, or Err, if it does not exist