]> git.ipfire.org Git - thirdparty/systemd.git/blob - man/udev_device_get_syspath.xml
test-execute: Add tests for new PassEnvironment= directive
[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 This file is part of systemd.
10
11 Copyright 2015 David Herrmann <dh.herrmann@gmail.com>
12
13 systemd is free software; you can redistribute it and/or modify it
14 under the terms of the GNU Lesser General Public License as published by
15 the Free Software Foundation; either version 2.1 of the License, or
16 (at your option) any later version.
17
18 systemd is distributed in the hope that it will be useful, but
19 WITHOUT ANY WARRANTY; without even the implied warranty of
20 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
21 Lesser General Public License for more details.
22
23 You should have received a copy of the GNU Lesser General Public License
24 along with systemd; If not, see <http://www.gnu.org/licenses/>.
25 -->
26
27 <refentry id="udev_device_get_syspath"
28 xmlns:xi="http://www.w3.org/2001/XInclude">
29
30 <refentryinfo>
31 <title>udev_device_get_syspath</title>
32 <productname>systemd</productname>
33
34 <authorgroup>
35 <author>
36 <contrib>Developer</contrib>
37 <firstname>David</firstname>
38 <surname>Herrmann</surname>
39 <email>dh.herrmann@gmail.com</email>
40 </author>
41 </authorgroup>
42 </refentryinfo>
43
44 <refmeta>
45 <refentrytitle>udev_device_get_syspath</refentrytitle>
46 <manvolnum>3</manvolnum>
47 </refmeta>
48
49 <refnamediv>
50 <refname>udev_device_get_syspath</refname>
51 <refname>udev_device_get_sysname</refname>
52 <refname>udev_device_get_sysnum</refname>
53 <refname>udev_device_get_devpath</refname>
54 <refname>udev_device_get_devnode</refname>
55 <refname>udev_device_get_devnum</refname>
56 <refname>udev_device_get_devtype</refname>
57 <refname>udev_device_get_subsystem</refname>
58 <refname>udev_device_get_driver</refname>
59 <refname>udev_device_get_udev</refname>
60 <refname>udev_device_get_parent</refname>
61 <refname>udev_device_get_parent_with_subsystem_devtype</refname>
62 <refname>udev_device_get_is_initialized</refname>
63 <refname>udev_device_get_action</refname>
64
65 <refpurpose>Query device properties</refpurpose>
66 </refnamediv>
67
68 <refsynopsisdiv>
69 <funcsynopsis>
70 <funcsynopsisinfo>#include &lt;libudev.h&gt;</funcsynopsisinfo>
71
72 <funcprototype>
73 <funcdef>const char *<function>udev_device_get_syspath</function></funcdef>
74 <paramdef>struct udev_device *<parameter>udev_device</parameter></paramdef>
75 </funcprototype>
76
77 <funcprototype>
78 <funcdef>const char *<function>udev_device_get_sysname</function></funcdef>
79 <paramdef>struct udev_device *<parameter>udev_device</parameter></paramdef>
80 </funcprototype>
81
82 <funcprototype>
83 <funcdef>const char *<function>udev_device_get_sysnum</function></funcdef>
84 <paramdef>struct udev_device *<parameter>udev_device</parameter></paramdef>
85 </funcprototype>
86
87 <funcprototype>
88 <funcdef>const char *<function>udev_device_get_devpath</function></funcdef>
89 <paramdef>struct udev_device *<parameter>udev_device</parameter></paramdef>
90 </funcprototype>
91
92 <funcprototype>
93 <funcdef>const char *<function>udev_device_get_devnode</function></funcdef>
94 <paramdef>struct udev_device *<parameter>udev_device</parameter></paramdef>
95 </funcprototype>
96
97 <funcprototype>
98 <funcdef>dev_t <function>udev_device_get_devnum</function></funcdef>
99 <paramdef>struct udev_device *<parameter>udev_device</parameter></paramdef>
100 </funcprototype>
101
102 <funcprototype>
103 <funcdef>const char *<function>udev_device_get_devtype</function></funcdef>
104 <paramdef>struct udev_device *<parameter>udev_device</parameter></paramdef>
105 </funcprototype>
106
107 <funcprototype>
108 <funcdef>const char *<function>udev_device_get_subsystem</function></funcdef>
109 <paramdef>struct udev_device *<parameter>udev_device</parameter></paramdef>
110 </funcprototype>
111
112 <funcprototype>
113 <funcdef>const char *<function>udev_device_get_driver</function></funcdef>
114 <paramdef>struct udev_device *<parameter>udev_device</parameter></paramdef>
115 </funcprototype>
116
117 <funcprototype>
118 <funcdef>struct udev *<function>udev_device_get_udev</function></funcdef>
119 <paramdef>struct udev_device *<parameter>udev_device</parameter></paramdef>
120 </funcprototype>
121
122 <funcprototype>
123 <funcdef>struct udev_device *<function>udev_device_get_parent</function></funcdef>
124 <paramdef>struct udev_device *<parameter>udev_device</parameter></paramdef>
125 </funcprototype>
126
127 <funcprototype>
128 <funcdef>struct udev_device *<function>udev_device_get_parent_with_subsystem_devtype</function></funcdef>
129 <paramdef>struct udev_device *<parameter>udev_device</parameter></paramdef>
130 </funcprototype>
131
132 <funcprototype>
133 <funcdef>int <function>udev_device_get_is_initialized</function></funcdef>
134 <paramdef>struct udev_device *<parameter>udev_device</parameter></paramdef>
135 </funcprototype>
136
137 <funcprototype>
138 <funcdef>const char *<function>udev_device_get_action</function></funcdef>
139 <paramdef>struct udev_device *<parameter>udev_device</parameter></paramdef>
140 <paramdef>const char *<parameter>subsystem</parameter></paramdef>
141 <paramdef>const char *<parameter>devtype</parameter></paramdef>
142 </funcprototype>
143
144 </funcsynopsis>
145 </refsynopsisdiv>
146
147 <!--<refsect1>
148 <title>Description</title>
149
150 <para>XXX: Add documentation.</para>
151 </refsect1>-->
152
153 <refsect1>
154 <title>Return Value</title>
155
156 <para>On success, <function>udev_device_get_syspath()</function>,
157 <function>udev_device_get_sysname()</function>,
158 <function>udev_device_get_sysnum()</function>,
159 <function>udev_device_get_devpath()</function>,
160 <function>udev_device_get_devnode()</function>,
161 <function>udev_device_get_devtype()</function>,
162 <function>udev_device_get_subsystem()</function>,
163 <function>udev_device_get_driver()</function> and
164 <function>udev_device_get_action()</function> return a pointer
165 to a constant string that describes the requested property. The
166 lifetime of this string is bound to the device it was requested
167 on. On failure, each function may return
168 <constant>NULL</constant>.</para>
169
170 <para>On success, <function>udev_device_get_devnum()</function>
171 returns the device type of the passed device. On failure, a
172 device type with minor and major number set to
173 <constant>0</constant> is returned.</para>
174
175 <para><function>udev_device_get_udev()</function> always returns
176 a valid pointer to the udev context that this device belongs
177 to.</para>
178
179 <para>On success, <function>udev_device_get_parent()</function>
180 and
181 <function>udev_device_get_parent_with_subsystem_devtype()</function>
182 return a pointer to the parent device. No additional reference
183 to this device is acquired, but the child device owns a reference
184 to such a parent device. On failure, <constant>NULL</constant>
185 is returned.</para>
186
187 <para>On success, <function>udev_device_get_is_initialized()</function>
188 returns either <constant>1</constant> or <constant>0</constant>,
189 depending on whether the passed device is initialized or not. On
190 failure, a negative error code is returned.</para>
191 </refsect1>
192
193 <refsect1>
194 <title>See Also</title>
195
196 <para>
197 <citerefentry><refentrytitle>udev_new</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
198 <citerefentry><refentrytitle>udev_device_new_from_syspath</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
199 <citerefentry><refentrytitle>udev_device_has_tag</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
200 <citerefentry><refentrytitle>udev_enumerate_new</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
201 <citerefentry><refentrytitle>udev_monitor_new_from_netlink</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
202 <citerefentry><refentrytitle>udev_list_entry</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
203 <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
204 </para>
205 </refsect1>
206
207 </refentry>