From 00dbd902e9d55694cfb7c143ab54e8c08484d28e Mon Sep 17 00:00:00 2001 From: Tom Gundersen Date: Wed, 17 Jun 2015 19:48:15 +0200 Subject: man: libudev - add description to udev_device_* --- man/udev_device_new_from_syspath.xml | 47 +++++++++++++++++++++++++++++++++--- 1 file changed, 44 insertions(+), 3 deletions(-) (limited to 'man') diff --git a/man/udev_device_new_from_syspath.xml b/man/udev_device_new_from_syspath.xml index c3c0d763e4..fc147a879a 100644 --- a/man/udev_device_new_from_syspath.xml +++ b/man/udev_device_new_from_syspath.xml @@ -106,11 +106,52 @@ - + udev_device_new_from_syspath, + udev_device_new_from_devnum, + udev_device_new_from_subsystem_sysname, + udev_device_new_from_device_id, and + udev_device_new_from_environment + allocate a new udev device object and returns a pointer to it. This + object is opaque and must not be accessed by the caller via different + means than functions provided by libudev. Initially, the reference count + of the device is 1. You can acquire further references, and drop + gained references via udev_device_ref() and + udev_device_unref(). Once the reference count hits 0, + the device object is destroyed and freed. + + udev_device_new_from_syspath, + udev_device_new_from_devnum, + udev_device_new_from_subsystem_sysname, and + udev_device_new_from_device_id + create the device object based on information found in + /sys annotated with properties from the udev-internal + device database. A syspath is any subdirectory of /sys, + with the restriction that a subdirectory of /sys/devices + (or a symlink to one) represents a real device and as such must contain + a uevent file. udev_device_new_from_devnum + takes a device type, which can be b for block devices or + c for character devices, as well as a devnum (see + makedev3). + udev_device_new_from_subsystem_sysname looks up devices based + on the provided subsystem and sysname and + udev_device_new_from_device_id looks up devices based on the provided + device id (see + udev_device_get_subsystem3). + + + udev_device_new_from_environment + creates a device from the current environment (see + environ7). + Each key-value pair is interpreted in the same way as if it was + received in an uevent (see + udev_monitor_receive_device3). + The keys DEVPATH, SUBSYSTEM, + ACTION, and SEQNUM are mandatory. + + Return Value -- cgit v1.2.3-54-g00ecf