X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=elogind.git;a=blobdiff_plain;f=src%2Flibudev%2Flibudev-device.c;h=1bef70962c59d7b8a080a6b21090fcf22c644ca8;hp=98077e777de7c4787d4c5d1a47c45c30af17eaed;hb=dbf61afb29e016fe1b4ac48312a782df1d60a3e6;hpb=c516c8d17f77a1c761447f4c40c8dfffeda2e06d diff --git a/src/libudev/libudev-device.c b/src/libudev/libudev-device.c index 98077e777..1bef70962 100644 --- a/src/libudev/libudev-device.c +++ b/src/libudev/libudev-device.c @@ -714,7 +714,25 @@ _public_ struct udev_device *udev_device_new_from_devnum(struct udev *udev, char return udev_device_new_from_syspath(udev, path); } -struct udev_device *udev_device_new_from_id_filename(struct udev *udev, char *id) +/** + * udev_device_new_from_device_id: + * @udev: udev library context + * @id: text string identifying a kernel device + * + * Create new udev device, and fill in information from the sys + * device and the udev database entry. The device is looked-up + * by a special string: + * b8:2 - block device major:minor + * c128:1 - char device major:minor + * n3 - network device ifindex + * +sound:card29 - kernel driver core subsystem:device name + * + * The initial refcount is 1, and needs to be decremented to + * release the resources of the udev device. + * + * Returns: a new udev device, or #NULL, if it does not exist + **/ +_public_ struct udev_device *udev_device_new_from_device_id(struct udev *udev, char *id) { char type; int maj, min;