summaryrefslogtreecommitdiffstats
path: root/upstream/opensuse-tumbleweed/man3/udev_device_get_syspath.3
blob: 3e610f8fd9002658621861db1c87bff87a1171a0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
'\" t
.TH "UDEV_DEVICE_GET_SYSPATH" "3" "" "systemd 254" "udev_device_get_syspath"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.\" http://bugs.debian.org/507673
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.ie \n(.g .ds Aq \(aq
.el       .ds Aq '
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
.\" disable hyphenation
.nh
.\" disable justification (adjust text to left margin only)
.ad l
.\" -----------------------------------------------------------------
.\" * MAIN CONTENT STARTS HERE *
.\" -----------------------------------------------------------------
.SH "NAME"
udev_device_get_syspath, udev_device_get_sysname, udev_device_get_sysnum, udev_device_get_devpath, udev_device_get_devnode, udev_device_get_devnum, udev_device_get_devtype, udev_device_get_subsystem, udev_device_get_driver, udev_device_get_udev, udev_device_get_parent, udev_device_get_parent_with_subsystem_devtype, udev_device_get_is_initialized, udev_device_get_action \- Query device properties
.SH "SYNOPSIS"
.sp
.ft B
.nf
#include <libudev\&.h>
.fi
.ft
.HP \w'const\ char\ *udev_device_get_syspath('u
.BI "const char *udev_device_get_syspath(struct\ udev_device\ *" "udev_device" ");"
.HP \w'const\ char\ *udev_device_get_sysname('u
.BI "const char *udev_device_get_sysname(struct\ udev_device\ *" "udev_device" ");"
.HP \w'const\ char\ *udev_device_get_sysnum('u
.BI "const char *udev_device_get_sysnum(struct\ udev_device\ *" "udev_device" ");"
.HP \w'const\ char\ *udev_device_get_devpath('u
.BI "const char *udev_device_get_devpath(struct\ udev_device\ *" "udev_device" ");"
.HP \w'const\ char\ *udev_device_get_devnode('u
.BI "const char *udev_device_get_devnode(struct\ udev_device\ *" "udev_device" ");"
.HP \w'dev_t\ udev_device_get_devnum('u
.BI "dev_t udev_device_get_devnum(struct\ udev_device\ *" "udev_device" ");"
.HP \w'const\ char\ *udev_device_get_devtype('u
.BI "const char *udev_device_get_devtype(struct\ udev_device\ *" "udev_device" ");"
.HP \w'const\ char\ *udev_device_get_subsystem('u
.BI "const char *udev_device_get_subsystem(struct\ udev_device\ *" "udev_device" ");"
.HP \w'const\ char\ *udev_device_get_driver('u
.BI "const char *udev_device_get_driver(struct\ udev_device\ *" "udev_device" ");"
.HP \w'struct\ udev\ *udev_device_get_udev('u
.BI "struct udev *udev_device_get_udev(struct\ udev_device\ *" "udev_device" ");"
.HP \w'struct\ udev_device\ *udev_device_get_parent('u
.BI "struct udev_device *udev_device_get_parent(struct\ udev_device\ *" "udev_device" ");"
.HP \w'struct\ udev_device\ *udev_device_get_parent_with_subsystem_devtype('u
.BI "struct udev_device *udev_device_get_parent_with_subsystem_devtype(struct\ udev_device\ *" "udev_device" ", const\ char\ *" "subsystem" ", const\ char\ *" "devtype" ");"
.HP \w'int\ udev_device_get_is_initialized('u
.BI "int udev_device_get_is_initialized(struct\ udev_device\ *" "udev_device" ");"
.HP \w'const\ char\ *udev_device_get_action('u
.BI "const char *udev_device_get_action(struct\ udev_device\ *" "udev_device" ");"
.SH "RETURN VALUE"
.PP
On success,
\fBudev_device_get_syspath()\fR,
\fBudev_device_get_sysname()\fR,
\fBudev_device_get_sysnum()\fR,
\fBudev_device_get_devpath()\fR,
\fBudev_device_get_devnode()\fR,
\fBudev_device_get_devtype()\fR,
\fBudev_device_get_subsystem()\fR,
\fBudev_device_get_driver()\fR
and
\fBudev_device_get_action()\fR
return a pointer to a constant string that describes the requested property\&. The lifetime of this string is bound to the device it was requested on\&. On failure, each function may return
\fBNULL\fR\&.
.PP
On success,
\fBudev_device_get_devnum()\fR
returns the device type of the passed device\&. On failure, a device type with minor and major number set to
\fB0\fR
is returned\&.
.PP
\fBudev_device_get_udev()\fR
always returns a valid pointer to the udev context that this device belongs to\&.
.PP
On success,
\fBudev_device_get_parent()\fR
and
\fBudev_device_get_parent_with_subsystem_devtype()\fR
return a pointer to the parent device\&. No additional reference to this device is acquired, but the child device owns a reference to such a parent device\&. On failure,
\fBNULL\fR
is returned\&.
.PP
On success,
\fBudev_device_get_is_initialized()\fR
returns either
\fB1\fR
or
\fB0\fR, depending on whether the passed device has already been initialized by udev or not\&. On failure, a negative error code is returned\&. Note that devices for which no udev rules are defined are never reported initialized\&.
.SH "SEE ALSO"
.PP
\fBudev_new\fR(3),
\fBudev_device_new_from_syspath\fR(3),
\fBudev_device_has_tag\fR(3),
\fBudev_enumerate_new\fR(3),
\fBudev_monitor_new_from_netlink\fR(3),
\fBudev_list_entry\fR(3),
\fBsystemd\fR(1)