]> git.ipfire.org Git - thirdparty/systemd.git/blob - man/udev_device_get_syspath.xml
docs: note that udev doesn't deal with binary attribute values (#11383)
[thirdparty/systemd.git] / man / udev_device_get_syspath.xml
1 <?xml version='1.0'?> <!--*-nxml-*-->
2 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
3 "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" [
4 <!ENTITY % entities SYSTEM "custom-entities.ent" >
5 %entities;
6 ]>
7
8 <!--
9 SPDX-License-Identifier: LGPL-2.1+
10 -->
11
12 <refentry id="udev_device_get_syspath"
13 xmlns:xi="http://www.w3.org/2001/XInclude">
14
15 <refentryinfo>
16 <title>udev_device_get_syspath</title>
17 <productname>systemd</productname>
18 </refentryinfo>
19
20 <refmeta>
21 <refentrytitle>udev_device_get_syspath</refentrytitle>
22 <manvolnum>3</manvolnum>
23 </refmeta>
24
25 <refnamediv>
26 <refname>udev_device_get_syspath</refname>
27 <refname>udev_device_get_sysname</refname>
28 <refname>udev_device_get_sysnum</refname>
29 <refname>udev_device_get_devpath</refname>
30 <refname>udev_device_get_devnode</refname>
31 <refname>udev_device_get_devnum</refname>
32 <refname>udev_device_get_devtype</refname>
33 <refname>udev_device_get_subsystem</refname>
34 <refname>udev_device_get_driver</refname>
35 <refname>udev_device_get_udev</refname>
36 <refname>udev_device_get_parent</refname>
37 <refname>udev_device_get_parent_with_subsystem_devtype</refname>
38 <refname>udev_device_get_is_initialized</refname>
39 <refname>udev_device_get_action</refname>
40
41 <refpurpose>Query device properties</refpurpose>
42 </refnamediv>
43
44 <refsynopsisdiv>
45 <funcsynopsis>
46 <funcsynopsisinfo>#include &lt;libudev.h&gt;</funcsynopsisinfo>
47
48 <funcprototype>
49 <funcdef>const char *<function>udev_device_get_syspath</function></funcdef>
50 <paramdef>struct udev_device *<parameter>udev_device</parameter></paramdef>
51 </funcprototype>
52
53 <funcprototype>
54 <funcdef>const char *<function>udev_device_get_sysname</function></funcdef>
55 <paramdef>struct udev_device *<parameter>udev_device</parameter></paramdef>
56 </funcprototype>
57
58 <funcprototype>
59 <funcdef>const char *<function>udev_device_get_sysnum</function></funcdef>
60 <paramdef>struct udev_device *<parameter>udev_device</parameter></paramdef>
61 </funcprototype>
62
63 <funcprototype>
64 <funcdef>const char *<function>udev_device_get_devpath</function></funcdef>
65 <paramdef>struct udev_device *<parameter>udev_device</parameter></paramdef>
66 </funcprototype>
67
68 <funcprototype>
69 <funcdef>const char *<function>udev_device_get_devnode</function></funcdef>
70 <paramdef>struct udev_device *<parameter>udev_device</parameter></paramdef>
71 </funcprototype>
72
73 <funcprototype>
74 <funcdef>dev_t <function>udev_device_get_devnum</function></funcdef>
75 <paramdef>struct udev_device *<parameter>udev_device</parameter></paramdef>
76 </funcprototype>
77
78 <funcprototype>
79 <funcdef>const char *<function>udev_device_get_devtype</function></funcdef>
80 <paramdef>struct udev_device *<parameter>udev_device</parameter></paramdef>
81 </funcprototype>
82
83 <funcprototype>
84 <funcdef>const char *<function>udev_device_get_subsystem</function></funcdef>
85 <paramdef>struct udev_device *<parameter>udev_device</parameter></paramdef>
86 </funcprototype>
87
88 <funcprototype>
89 <funcdef>const char *<function>udev_device_get_driver</function></funcdef>
90 <paramdef>struct udev_device *<parameter>udev_device</parameter></paramdef>
91 </funcprototype>
92
93 <funcprototype>
94 <funcdef>struct udev *<function>udev_device_get_udev</function></funcdef>
95 <paramdef>struct udev_device *<parameter>udev_device</parameter></paramdef>
96 </funcprototype>
97
98 <funcprototype>
99 <funcdef>struct udev_device *<function>udev_device_get_parent</function></funcdef>
100 <paramdef>struct udev_device *<parameter>udev_device</parameter></paramdef>
101 </funcprototype>
102
103 <funcprototype>
104 <funcdef>struct udev_device *<function>udev_device_get_parent_with_subsystem_devtype</function></funcdef>
105 <paramdef>struct udev_device *<parameter>udev_device</parameter></paramdef>
106 <paramdef>const char *<parameter>subsystem</parameter></paramdef>
107 <paramdef>const char *<parameter>devtype</parameter></paramdef>
108 </funcprototype>
109
110 <funcprototype>
111 <funcdef>int <function>udev_device_get_is_initialized</function></funcdef>
112 <paramdef>struct udev_device *<parameter>udev_device</parameter></paramdef>
113 </funcprototype>
114
115 <funcprototype>
116 <funcdef>const char *<function>udev_device_get_action</function></funcdef>
117 <paramdef>struct udev_device *<parameter>udev_device</parameter></paramdef>
118 </funcprototype>
119
120 </funcsynopsis>
121 </refsynopsisdiv>
122
123 <!--<refsect1>
124 <title>Description</title>
125
126 <para>XXX: Add documentation.</para>
127 </refsect1>-->
128
129 <refsect1>
130 <title>Return Value</title>
131
132 <para>On success, <function>udev_device_get_syspath()</function>,
133 <function>udev_device_get_sysname()</function>,
134 <function>udev_device_get_sysnum()</function>,
135 <function>udev_device_get_devpath()</function>,
136 <function>udev_device_get_devnode()</function>,
137 <function>udev_device_get_devtype()</function>,
138 <function>udev_device_get_subsystem()</function>,
139 <function>udev_device_get_driver()</function> and
140 <function>udev_device_get_action()</function> return a pointer
141 to a constant string that describes the requested property. The
142 lifetime of this string is bound to the device it was requested
143 on. On failure, each function may return
144 <constant>NULL</constant>.</para>
145
146 <para>On success, <function>udev_device_get_devnum()</function>
147 returns the device type of the passed device. On failure, a
148 device type with minor and major number set to
149 <constant>0</constant> is returned.</para>
150
151 <para><function>udev_device_get_udev()</function> always returns
152 a valid pointer to the udev context that this device belongs
153 to.</para>
154
155 <para>On success, <function>udev_device_get_parent()</function>
156 and
157 <function>udev_device_get_parent_with_subsystem_devtype()</function>
158 return a pointer to the parent device. No additional reference
159 to this device is acquired, but the child device owns a reference
160 to such a parent device. On failure, <constant>NULL</constant>
161 is returned.</para>
162
163 <para>On success, <function>udev_device_get_is_initialized()</function> returns either <constant>1</constant> or
164 <constant>0</constant>, depending on whether the passed device has already been initialized by udev or not. On
165 failure, a negative error code is returned. Note that devices for which no udev rules are defined are never
166 reported initialized.</para>
167 </refsect1>
168
169 <refsect1>
170 <title>See Also</title>
171
172 <para>
173 <citerefentry><refentrytitle>udev_new</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
174 <citerefentry><refentrytitle>udev_device_new_from_syspath</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
175 <citerefentry><refentrytitle>udev_device_has_tag</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
176 <citerefentry><refentrytitle>udev_enumerate_new</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
177 <citerefentry><refentrytitle>udev_monitor_new_from_netlink</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
178 <citerefentry><refentrytitle>udev_list_entry</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
179 <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
180 </para>
181 </refsect1>
182
183 </refentry>