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