UDEV_DEVICE_NEW_FROM_SYSPATH - Online Linux Manual PageSection : 3
Updated :
Source : systemd 250
Note : udev_device_new_from_syspath
NAMEudev_device_new_from_syspath, udev_device_new_from_devnum, udev_device_new_from_subsystem_sysname, udev_device_new_from_device_id, udev_device_new_from_environment, udev_device_ref, udev_device_unref − Create, acquire and release a udev device object
SYNOPSIS#include <libudev.h>struct udev_device *udev_device_new_from_syspath(struct udev *udev, const char *syspath); struct udev_device *udev_device_new_from_devnum(struct udev *udev, char type, dev_t devnum); struct udev_device *udev_device_new_from_subsystem_sysname(struct udev *udev, const char *subsystem, const char *sysname); struct udev_device *udev_device_new_from_device_id(struct udev *udev, const char *id); struct udev_device *udev_device_new_from_environment(struct udev *udev); struct udev_device *udev_device_ref(struct udev_device *udev_device); struct udev_device *udev_device_unref(struct udev_device *udev_device);
DESCRIPTIONudev_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 makedev(3)). udev_device_new_from_subsystem_sysname() looks up devices based on the provided subsystem and sysname (see udev_device_get_subsystem(3) and udev_device_get_sysname(3)) and udev_device_new_from_device_id() looks up devices based on the provided device ID, which is a special string in one of the following four forms: .it 1 an-trap
Table 1. Device ID strings Example Explanation b8:2 block device major:minor c128:1 char device major:minor n3 network device ifindex +sound:card29 kernel driver core subsystem:device name udev_device_new_from_environment() creates a device from the current environment (see environ(7)). Each key−value pair is interpreted in the same way as if it was received in an uevent (see udev_monitor_receive_device(3)). The keys DEVPATH, SUBSYSTEM, ACTION, and SEQNUM are mandatory.
RETURN VALUEOn success, 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() return a pointer to the allocated udev device. On failure, NULL is returned, and errno is set appropriately. udev_device_ref() returns the argument that it was passed, unmodified. udev_device_unref() always returns NULL.
SEE ALSOudev_new(3), udev_device_get_syspath(3), udev_device_has_tag(3), udev_enumerate_new(3), udev_monitor_new_from_netlink(3), udev_list_entry(3), systemd(1), 0
Johanes Gumabo
Data Size : 15,090 byte
man-udev_device_new_from_subsystem_sysname.3Build : 2024-12-05, 20:55 :
Visitor Screen : x
Visitor Counter ( page / site ) : 4 / 170,625
Visitor ID : :
Visitor IP : 18.119.235.107 :
Visitor Provider : AMAZON-02 :
Provider Position ( lat x lon ) : 39.962500 x -83.006100 : x
Provider Accuracy Radius ( km ) : 1000 :
Provider City : Columbus :
Provider Province : Ohio , : ,
Provider Country : United States :
Provider Continent : North America :
Visitor Recorder : Version :
Visitor Recorder : Library :
Online Linux Manual Page : Version : Online Linux Manual Page - Fedora.40 - march=x86-64 - mtune=generic - 24.12.05
Online Linux Manual Page : Library : lib_c - 24.10.03 - march=x86-64 - mtune=generic - Fedora.40
Online Linux Manual Page : Library : lib_m - 24.10.03 - march=x86-64 - mtune=generic - Fedora.40
Data Base : Version : Online Linux Manual Page Database - 24.04.13 - march=x86-64 - mtune=generic - fedora-38
Data Base : Library : lib_c - 23.02.07 - march=x86-64 - mtune=generic - fedora.36
Very long time ago, I have the best tutor, Wenzel Svojanovsky . If someone knows the email address of Wenzel Svojanovsky , please send an email to johanes_gumabo@yahoo.co.id .
If error, please print screen and send to johanes_gumabo@yahoo.co.id
Under development. Support me via PayPal.
ERROR : Need New Coding : (parse_manual_page_|249|udev_device_new_from_syspath.3|83|it|.it 1 an-trap
)