1UDEV_DEVICE_GET_SYSPATH(3) udev_device_get_syspath UDEV_DEVICE_GET_SYSPATH(3)
2
3
4
6 udev_device_get_syspath, udev_device_get_sysname,
7 udev_device_get_sysnum, udev_device_get_devpath,
8 udev_device_get_devnode, udev_device_get_devnum,
9 udev_device_get_devtype, udev_device_get_subsystem,
10 udev_device_get_driver, udev_device_get_udev, udev_device_get_parent,
11 udev_device_get_parent_with_subsystem_devtype,
12 udev_device_get_is_initialized, udev_device_get_action - Query device
13 properties
14
16 #include <libudev.h>
17
18 const char *udev_device_get_syspath(struct udev_device *udev_device);
19
20 const char *udev_device_get_sysname(struct udev_device *udev_device);
21
22 const char *udev_device_get_sysnum(struct udev_device *udev_device);
23
24 const char *udev_device_get_devpath(struct udev_device *udev_device);
25
26 const char *udev_device_get_devnode(struct udev_device *udev_device);
27
28 dev_t udev_device_get_devnum(struct udev_device *udev_device);
29
30 const char *udev_device_get_devtype(struct udev_device *udev_device);
31
32 const char *udev_device_get_subsystem(struct udev_device *udev_device);
33
34 const char *udev_device_get_driver(struct udev_device *udev_device);
35
36 struct udev *udev_device_get_udev(struct udev_device *udev_device);
37
38 struct udev_device
39 *udev_device_get_parent(struct udev_device *udev_device);
40
41 struct udev_device
42 *udev_device_get_parent_with_subsystem_devtype(struct udev_device *udev_device,
43 const char *subsystem,
44 const char *devtype);
45
46 int udev_device_get_is_initialized(struct udev_device *udev_device);
47
48 const char *udev_device_get_action(struct udev_device *udev_device);
49
51 On success, udev_device_get_syspath(), udev_device_get_sysname(),
52 udev_device_get_sysnum(), udev_device_get_devpath(),
53 udev_device_get_devnode(), udev_device_get_devtype(),
54 udev_device_get_subsystem(), udev_device_get_driver() and
55 udev_device_get_action() return a pointer to a constant string that
56 describes the requested property. The lifetime of this string is bound
57 to the device it was requested on. On failure, each function may return
58 NULL.
59
60 On success, udev_device_get_devnum() returns the device type of the
61 passed device. On failure, a device type with minor and major number
62 set to 0 is returned.
63
64 udev_device_get_udev() always returns a valid pointer to the udev
65 context that this device belongs to.
66
67 On success, udev_device_get_parent() and
68 udev_device_get_parent_with_subsystem_devtype() return a pointer to the
69 parent device. No additional reference to this device is acquired, but
70 the child device owns a reference to such a parent device. On failure,
71 NULL is returned.
72
73 On success, udev_device_get_is_initialized() returns either 1 or 0,
74 depending on whether the passed device has already been initialized by
75 udev or not. On failure, a negative error code is returned. Note that
76 devices for which no udev rules are defined are never reported
77 initialized.
78
80 udev_new(3), udev_device_new_from_syspath(3), udev_device_has_tag(3),
81 udev_enumerate_new(3), udev_monitor_new_from_netlink(3),
82 udev_list_entry(3), systemd(1),
83
84
85
86systemd 239 UDEV_DEVICE_GET_SYSPATH(3)