]>
Commit | Line | Data |
---|---|---|
663996b3 MS |
1 | <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> |
2 | <html> | |
3 | <head> | |
4 | <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> | |
f47781d8 | 5 | <title>libudev Reference Manual: udev_device</title> |
663996b3 MS |
6 | <meta name="generator" content="DocBook XSL Stylesheets V1.78.1"> |
7 | <link rel="home" href="index.html" title="libudev Reference Manual"> | |
8 | <link rel="up" href="ch01.html" title="API Reference"> | |
9 | <link rel="prev" href="libudev-udev-list.html" title="udev_list"> | |
10 | <link rel="next" href="libudev-udev-monitor.html" title="udev_monitor"> | |
f47781d8 | 11 | <meta name="generator" content="GTK-Doc V1.21 (XML mode)"> |
663996b3 MS |
12 | <link rel="stylesheet" href="style.css" type="text/css"> |
13 | </head> | |
14 | <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> | |
f47781d8 MP |
15 | <table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="5"><tr valign="middle"> |
16 | <td width="100%" align="left" class="shortcuts"> | |
17 | <a href="#" class="shortcut">Top</a><span id="nav_description"> <span class="dim">|</span> | |
18 | <a href="#libudev-udev-device.description" class="shortcut">Description</a></span> | |
19 | </td> | |
20 | <td><a accesskey="h" href="index.html"><img src="home.png" width="16" height="16" border="0" alt="Home"></a></td> | |
21 | <td><a accesskey="u" href="ch01.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td> | |
22 | <td><a accesskey="p" href="libudev-udev-list.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td> | |
23 | <td><a accesskey="n" href="libudev-udev-monitor.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td> | |
24 | </tr></table> | |
663996b3 MS |
25 | <div class="refentry"> |
26 | <a name="libudev-udev-device"></a><div class="titlepage"></div> | |
27 | <div class="refnamediv"><table width="100%"><tr> | |
28 | <td valign="top"> | |
29 | <h2><span class="refentrytitle"><a name="libudev-udev-device.top_of_page"></a>udev_device</span></h2> | |
30 | <p>udev_device — kernel sys devices</p> | |
31 | </td> | |
f47781d8 | 32 | <td class="gallery_image" valign="top" align="right"></td> |
663996b3 | 33 | </tr></table></div> |
f47781d8 MP |
34 | <div class="refsect1"> |
35 | <a name="libudev-udev-device.functions"></a><h2>Functions</h2> | |
36 | <div class="informaltable"><table width="100%" border="0"> | |
37 | <colgroup> | |
38 | <col width="150px" class="functions_return"> | |
39 | <col class="functions_name"> | |
40 | </colgroup> | |
41 | <tbody> | |
42 | <tr> | |
43 | <td class="function_type">struct <a class="link" href="libudev-udev-device.html#udev-device" title="struct udev_device"><span class="returnvalue">udev_device</span></a> * | |
44 | </td> | |
45 | <td class="function_name"> | |
46 | <a class="link" href="libudev-udev-device.html#udev-device-ref" title="udev_device_ref ()">udev_device_ref</a> <span class="c_punctuation">()</span> | |
47 | </td> | |
48 | </tr> | |
49 | <tr> | |
50 | <td class="function_type">struct <a class="link" href="libudev-udev-device.html#udev-device" title="struct udev_device"><span class="returnvalue">udev_device</span></a> * | |
51 | </td> | |
52 | <td class="function_name"> | |
53 | <a class="link" href="libudev-udev-device.html#udev-device-unref" title="udev_device_unref ()">udev_device_unref</a> <span class="c_punctuation">()</span> | |
54 | </td> | |
55 | </tr> | |
56 | <tr> | |
57 | <td class="function_type">struct <a class="link" href="libudev-udev.html#udev" title="struct udev"><span class="returnvalue">udev</span></a> * | |
58 | </td> | |
59 | <td class="function_name"> | |
60 | <a class="link" href="libudev-udev-device.html#udev-device-get-udev" title="udev_device_get_udev ()">udev_device_get_udev</a> <span class="c_punctuation">()</span> | |
61 | </td> | |
62 | </tr> | |
63 | <tr> | |
64 | <td class="function_type">struct <a class="link" href="libudev-udev-device.html#udev-device" title="struct udev_device"><span class="returnvalue">udev_device</span></a> * | |
65 | </td> | |
66 | <td class="function_name"> | |
67 | <a class="link" href="libudev-udev-device.html#udev-device-new-from-syspath" title="udev_device_new_from_syspath ()">udev_device_new_from_syspath</a> <span class="c_punctuation">()</span> | |
68 | </td> | |
69 | </tr> | |
70 | <tr> | |
71 | <td class="function_type">struct <a class="link" href="libudev-udev-device.html#udev-device" title="struct udev_device"><span class="returnvalue">udev_device</span></a> * | |
72 | </td> | |
73 | <td class="function_name"> | |
74 | <a class="link" href="libudev-udev-device.html#udev-device-new-from-devnum" title="udev_device_new_from_devnum ()">udev_device_new_from_devnum</a> <span class="c_punctuation">()</span> | |
75 | </td> | |
76 | </tr> | |
77 | <tr> | |
78 | <td class="function_type">struct <a class="link" href="libudev-udev-device.html#udev-device" title="struct udev_device"><span class="returnvalue">udev_device</span></a> * | |
79 | </td> | |
80 | <td class="function_name"> | |
81 | <a class="link" href="libudev-udev-device.html#udev-device-new-from-subsystem-sysname" title="udev_device_new_from_subsystem_sysname ()">udev_device_new_from_subsystem_sysname</a> <span class="c_punctuation">()</span> | |
82 | </td> | |
83 | </tr> | |
84 | <tr> | |
85 | <td class="function_type">struct <a class="link" href="libudev-udev-device.html#udev-device" title="struct udev_device"><span class="returnvalue">udev_device</span></a> * | |
86 | </td> | |
87 | <td class="function_name"> | |
88 | <a class="link" href="libudev-udev-device.html#udev-device-new-from-device-id" title="udev_device_new_from_device_id ()">udev_device_new_from_device_id</a> <span class="c_punctuation">()</span> | |
89 | </td> | |
90 | </tr> | |
91 | <tr> | |
92 | <td class="function_type">struct <a class="link" href="libudev-udev-device.html#udev-device" title="struct udev_device"><span class="returnvalue">udev_device</span></a> * | |
93 | </td> | |
94 | <td class="function_name"> | |
95 | <a class="link" href="libudev-udev-device.html#udev-device-new-from-environment" title="udev_device_new_from_environment ()">udev_device_new_from_environment</a> <span class="c_punctuation">()</span> | |
96 | </td> | |
97 | </tr> | |
98 | <tr> | |
99 | <td class="function_type">struct <a class="link" href="libudev-udev-device.html#udev-device" title="struct udev_device"><span class="returnvalue">udev_device</span></a> * | |
100 | </td> | |
101 | <td class="function_name"> | |
102 | <a class="link" href="libudev-udev-device.html#udev-device-get-parent" title="udev_device_get_parent ()">udev_device_get_parent</a> <span class="c_punctuation">()</span> | |
103 | </td> | |
104 | </tr> | |
105 | <tr> | |
106 | <td class="function_type">struct <a class="link" href="libudev-udev-device.html#udev-device" title="struct udev_device"><span class="returnvalue">udev_device</span></a> * | |
107 | </td> | |
108 | <td class="function_name"> | |
109 | <a class="link" href="libudev-udev-device.html#udev-device-get-parent-with-subsystem-devtype" title="udev_device_get_parent_with_subsystem_devtype ()">udev_device_get_parent_with_subsystem_devtype</a> <span class="c_punctuation">()</span> | |
110 | </td> | |
111 | </tr> | |
112 | <tr> | |
113 | <td class="function_type">const <span class="returnvalue">char</span> * | |
114 | </td> | |
115 | <td class="function_name"> | |
116 | <a class="link" href="libudev-udev-device.html#udev-device-get-devpath" title="udev_device_get_devpath ()">udev_device_get_devpath</a> <span class="c_punctuation">()</span> | |
117 | </td> | |
118 | </tr> | |
119 | <tr> | |
120 | <td class="function_type">const <span class="returnvalue">char</span> * | |
121 | </td> | |
122 | <td class="function_name"> | |
123 | <a class="link" href="libudev-udev-device.html#udev-device-get-subsystem" title="udev_device_get_subsystem ()">udev_device_get_subsystem</a> <span class="c_punctuation">()</span> | |
124 | </td> | |
125 | </tr> | |
126 | <tr> | |
127 | <td class="function_type">const <span class="returnvalue">char</span> * | |
128 | </td> | |
129 | <td class="function_name"> | |
130 | <a class="link" href="libudev-udev-device.html#udev-device-get-devtype" title="udev_device_get_devtype ()">udev_device_get_devtype</a> <span class="c_punctuation">()</span> | |
131 | </td> | |
132 | </tr> | |
133 | <tr> | |
134 | <td class="function_type">const <span class="returnvalue">char</span> * | |
135 | </td> | |
136 | <td class="function_name"> | |
137 | <a class="link" href="libudev-udev-device.html#udev-device-get-syspath" title="udev_device_get_syspath ()">udev_device_get_syspath</a> <span class="c_punctuation">()</span> | |
138 | </td> | |
139 | </tr> | |
140 | <tr> | |
141 | <td class="function_type">const <span class="returnvalue">char</span> * | |
142 | </td> | |
143 | <td class="function_name"> | |
144 | <a class="link" href="libudev-udev-device.html#udev-device-get-sysname" title="udev_device_get_sysname ()">udev_device_get_sysname</a> <span class="c_punctuation">()</span> | |
145 | </td> | |
146 | </tr> | |
147 | <tr> | |
148 | <td class="function_type">const <span class="returnvalue">char</span> * | |
149 | </td> | |
150 | <td class="function_name"> | |
151 | <a class="link" href="libudev-udev-device.html#udev-device-get-sysnum" title="udev_device_get_sysnum ()">udev_device_get_sysnum</a> <span class="c_punctuation">()</span> | |
152 | </td> | |
153 | </tr> | |
154 | <tr> | |
155 | <td class="function_type">const <span class="returnvalue">char</span> * | |
156 | </td> | |
157 | <td class="function_name"> | |
158 | <a class="link" href="libudev-udev-device.html#udev-device-get-devnode" title="udev_device_get_devnode ()">udev_device_get_devnode</a> <span class="c_punctuation">()</span> | |
159 | </td> | |
160 | </tr> | |
161 | <tr> | |
162 | <td class="function_type"> | |
163 | <span class="returnvalue">int</span> | |
164 | </td> | |
165 | <td class="function_name"> | |
166 | <a class="link" href="libudev-udev-device.html#udev-device-get-is-initialized" title="udev_device_get_is_initialized ()">udev_device_get_is_initialized</a> <span class="c_punctuation">()</span> | |
167 | </td> | |
168 | </tr> | |
169 | <tr> | |
170 | <td class="function_type">struct <a class="link" href="libudev-udev-list.html#udev-list-entry" title="struct udev_list_entry"><span class="returnvalue">udev_list_entry</span></a> * | |
171 | </td> | |
172 | <td class="function_name"> | |
173 | <a class="link" href="libudev-udev-device.html#udev-device-get-devlinks-list-entry" title="udev_device_get_devlinks_list_entry ()">udev_device_get_devlinks_list_entry</a> <span class="c_punctuation">()</span> | |
174 | </td> | |
175 | </tr> | |
176 | <tr> | |
177 | <td class="function_type">struct <a class="link" href="libudev-udev-list.html#udev-list-entry" title="struct udev_list_entry"><span class="returnvalue">udev_list_entry</span></a> * | |
178 | </td> | |
179 | <td class="function_name"> | |
180 | <a class="link" href="libudev-udev-device.html#udev-device-get-properties-list-entry" title="udev_device_get_properties_list_entry ()">udev_device_get_properties_list_entry</a> <span class="c_punctuation">()</span> | |
181 | </td> | |
182 | </tr> | |
183 | <tr> | |
184 | <td class="function_type">struct <a class="link" href="libudev-udev-list.html#udev-list-entry" title="struct udev_list_entry"><span class="returnvalue">udev_list_entry</span></a> * | |
185 | </td> | |
186 | <td class="function_name"> | |
187 | <a class="link" href="libudev-udev-device.html#udev-device-get-tags-list-entry" title="udev_device_get_tags_list_entry ()">udev_device_get_tags_list_entry</a> <span class="c_punctuation">()</span> | |
188 | </td> | |
189 | </tr> | |
190 | <tr> | |
191 | <td class="function_type">const <span class="returnvalue">char</span> * | |
192 | </td> | |
193 | <td class="function_name"> | |
194 | <a class="link" href="libudev-udev-device.html#udev-device-get-property-value" title="udev_device_get_property_value ()">udev_device_get_property_value</a> <span class="c_punctuation">()</span> | |
195 | </td> | |
196 | </tr> | |
197 | <tr> | |
198 | <td class="function_type">const <span class="returnvalue">char</span> * | |
199 | </td> | |
200 | <td class="function_name"> | |
201 | <a class="link" href="libudev-udev-device.html#udev-device-get-driver" title="udev_device_get_driver ()">udev_device_get_driver</a> <span class="c_punctuation">()</span> | |
202 | </td> | |
203 | </tr> | |
204 | <tr> | |
205 | <td class="function_type"> | |
206 | <span class="returnvalue">dev_t</span> | |
207 | </td> | |
208 | <td class="function_name"> | |
209 | <a class="link" href="libudev-udev-device.html#udev-device-get-devnum" title="udev_device_get_devnum ()">udev_device_get_devnum</a> <span class="c_punctuation">()</span> | |
210 | </td> | |
211 | </tr> | |
212 | <tr> | |
213 | <td class="function_type">const <span class="returnvalue">char</span> * | |
214 | </td> | |
215 | <td class="function_name"> | |
216 | <a class="link" href="libudev-udev-device.html#udev-device-get-action" title="udev_device_get_action ()">udev_device_get_action</a> <span class="c_punctuation">()</span> | |
217 | </td> | |
218 | </tr> | |
219 | <tr> | |
220 | <td class="function_type">const <span class="returnvalue">char</span> * | |
221 | </td> | |
222 | <td class="function_name"> | |
223 | <a class="link" href="libudev-udev-device.html#udev-device-get-sysattr-value" title="udev_device_get_sysattr_value ()">udev_device_get_sysattr_value</a> <span class="c_punctuation">()</span> | |
224 | </td> | |
225 | </tr> | |
226 | <tr> | |
227 | <td class="function_type"> | |
228 | <span class="returnvalue">int</span> | |
229 | </td> | |
230 | <td class="function_name"> | |
231 | <a class="link" href="libudev-udev-device.html#udev-device-set-sysattr-value" title="udev_device_set_sysattr_value ()">udev_device_set_sysattr_value</a> <span class="c_punctuation">()</span> | |
232 | </td> | |
233 | </tr> | |
234 | <tr> | |
235 | <td class="function_type">struct <a class="link" href="libudev-udev-list.html#udev-list-entry" title="struct udev_list_entry"><span class="returnvalue">udev_list_entry</span></a> * | |
236 | </td> | |
237 | <td class="function_name"> | |
238 | <a class="link" href="libudev-udev-device.html#udev-device-get-sysattr-list-entry" title="udev_device_get_sysattr_list_entry ()">udev_device_get_sysattr_list_entry</a> <span class="c_punctuation">()</span> | |
239 | </td> | |
240 | </tr> | |
241 | <tr> | |
242 | <td class="function_type">unsigned long long <span class="returnvalue">int</span> | |
243 | </td> | |
244 | <td class="function_name"> | |
245 | <a class="link" href="libudev-udev-device.html#udev-device-get-seqnum" title="udev_device_get_seqnum ()">udev_device_get_seqnum</a> <span class="c_punctuation">()</span> | |
246 | </td> | |
247 | </tr> | |
248 | <tr> | |
249 | <td class="function_type">unsigned long long <span class="returnvalue">int</span> | |
250 | </td> | |
251 | <td class="function_name"> | |
252 | <a class="link" href="libudev-udev-device.html#udev-device-get-usec-since-initialized" title="udev_device_get_usec_since_initialized ()">udev_device_get_usec_since_initialized</a> <span class="c_punctuation">()</span> | |
253 | </td> | |
254 | </tr> | |
255 | <tr> | |
256 | <td class="function_type"> | |
257 | <span class="returnvalue">int</span> | |
258 | </td> | |
259 | <td class="function_name"> | |
260 | <a class="link" href="libudev-udev-device.html#udev-device-has-tag" title="udev_device_has_tag ()">udev_device_has_tag</a> <span class="c_punctuation">()</span> | |
261 | </td> | |
262 | </tr> | |
263 | </tbody> | |
264 | </table></div> | |
265 | </div> | |
266 | <div class="refsect1"> | |
267 | <a name="libudev-udev-device.other"></a><h2>Types and Values</h2> | |
268 | <div class="informaltable"><table width="100%" border="0"> | |
269 | <colgroup> | |
270 | <col width="150px" class="name"> | |
271 | <col class="description"> | |
272 | </colgroup> | |
273 | <tbody><tr> | |
274 | <td class="datatype_keyword">struct</td> | |
275 | <td class="function_name"><a class="link" href="libudev-udev-device.html#udev-device" title="struct udev_device">udev_device</a></td> | |
276 | </tr></tbody> | |
277 | </table></div> | |
663996b3 MS |
278 | </div> |
279 | <div class="refsect1"> | |
280 | <a name="libudev-udev-device.description"></a><h2>Description</h2> | |
f47781d8 | 281 | <p>Representation of kernel sys devices. Devices are uniquely identified |
663996b3 | 282 | by their syspath, every device has exactly one path in the kernel sys |
14228c0d | 283 | filesystem. Devices usually belong to a kernel subsystem, and have |
f47781d8 | 284 | a unique name inside that subsystem.</p> |
663996b3 MS |
285 | </div> |
286 | <div class="refsect1"> | |
f47781d8 | 287 | <a name="libudev-udev-device.functions_details"></a><h2>Functions</h2> |
663996b3 | 288 | <div class="refsect2"> |
f47781d8 MP |
289 | <a name="udev-device-ref"></a><h3>udev_device_ref ()</h3> |
290 | <pre class="programlisting">struct <a class="link" href="libudev-udev-device.html#udev-device" title="struct udev_device"><span class="returnvalue">udev_device</span></a> * | |
291 | udev_device_ref (<em class="parameter"><code><span class="type">struct udev_device</span> *udev_device</code></em>);</pre> | |
292 | <p>Take a reference of a udev device.</p> | |
293 | <div class="refsect3"> | |
294 | <a name="id-1.2.4.6.2.5"></a><h4>Parameters</h4> | |
295 | <div class="informaltable"><table width="100%" border="0"> | |
663996b3 | 296 | <colgroup> |
f47781d8 MP |
297 | <col width="150px" class="parameters_name"> |
298 | <col class="parameters_description"> | |
299 | <col width="200px" class="parameters_annotations"> | |
663996b3 | 300 | </colgroup> |
f47781d8 MP |
301 | <tbody><tr> |
302 | <td class="parameter_name"><p>udev_device</p></td> | |
303 | <td class="parameter_description"><p>udev device</p></td> | |
304 | <td class="parameter_annotations"> </td> | |
305 | </tr></tbody> | |
663996b3 MS |
306 | </table></div> |
307 | </div> | |
f47781d8 MP |
308 | <div class="refsect3"> |
309 | <a name="id-1.2.4.6.2.6"></a><h4>Returns</h4> | |
310 | <p> the passed udev device</p> | |
311 | <p></p> | |
312 | </div> | |
313 | </div> | |
663996b3 MS |
314 | <hr> |
315 | <div class="refsect2"> | |
f47781d8 MP |
316 | <a name="udev-device-unref"></a><h3>udev_device_unref ()</h3> |
317 | <pre class="programlisting">struct <a class="link" href="libudev-udev-device.html#udev-device" title="struct udev_device"><span class="returnvalue">udev_device</span></a> * | |
318 | udev_device_unref (<em class="parameter"><code><span class="type">struct udev_device</span> *udev_device</code></em>);</pre> | |
319 | <p>Drop a reference of a udev device. If the refcount reaches zero, | |
320 | the resources of the device will be released.</p> | |
321 | <div class="refsect3"> | |
322 | <a name="id-1.2.4.6.3.5"></a><h4>Parameters</h4> | |
323 | <div class="informaltable"><table width="100%" border="0"> | |
663996b3 | 324 | <colgroup> |
f47781d8 MP |
325 | <col width="150px" class="parameters_name"> |
326 | <col class="parameters_description"> | |
327 | <col width="200px" class="parameters_annotations"> | |
663996b3 | 328 | </colgroup> |
f47781d8 MP |
329 | <tbody><tr> |
330 | <td class="parameter_name"><p>udev_device</p></td> | |
331 | <td class="parameter_description"><p>udev device</p></td> | |
332 | <td class="parameter_annotations"> </td> | |
333 | </tr></tbody> | |
663996b3 MS |
334 | </table></div> |
335 | </div> | |
f47781d8 MP |
336 | <div class="refsect3"> |
337 | <a name="id-1.2.4.6.3.6"></a><h4>Returns</h4> | |
338 | <p> <span class="type">NULL</span></p> | |
339 | <p></p> | |
340 | </div> | |
341 | </div> | |
663996b3 MS |
342 | <hr> |
343 | <div class="refsect2"> | |
f47781d8 MP |
344 | <a name="udev-device-get-udev"></a><h3>udev_device_get_udev ()</h3> |
345 | <pre class="programlisting">struct <a class="link" href="libudev-udev.html#udev" title="struct udev"><span class="returnvalue">udev</span></a> * | |
346 | udev_device_get_udev (<em class="parameter"><code><span class="type">struct udev_device</span> *udev_device</code></em>);</pre> | |
347 | <p>Retrieve the udev library context the device was created with.</p> | |
348 | <div class="refsect3"> | |
349 | <a name="id-1.2.4.6.4.5"></a><h4>Parameters</h4> | |
350 | <div class="informaltable"><table width="100%" border="0"> | |
663996b3 | 351 | <colgroup> |
f47781d8 MP |
352 | <col width="150px" class="parameters_name"> |
353 | <col class="parameters_description"> | |
354 | <col width="200px" class="parameters_annotations"> | |
663996b3 | 355 | </colgroup> |
f47781d8 MP |
356 | <tbody><tr> |
357 | <td class="parameter_name"><p>udev_device</p></td> | |
358 | <td class="parameter_description"><p>udev device</p></td> | |
359 | <td class="parameter_annotations"> </td> | |
360 | </tr></tbody> | |
663996b3 MS |
361 | </table></div> |
362 | </div> | |
f47781d8 MP |
363 | <div class="refsect3"> |
364 | <a name="id-1.2.4.6.4.6"></a><h4>Returns</h4> | |
365 | <p> the udev library context</p> | |
366 | <p></p> | |
367 | </div> | |
368 | </div> | |
663996b3 MS |
369 | <hr> |
370 | <div class="refsect2"> | |
f47781d8 MP |
371 | <a name="udev-device-new-from-syspath"></a><h3>udev_device_new_from_syspath ()</h3> |
372 | <pre class="programlisting">struct <a class="link" href="libudev-udev-device.html#udev-device" title="struct udev_device"><span class="returnvalue">udev_device</span></a> * | |
373 | udev_device_new_from_syspath (<em class="parameter"><code><span class="type">struct udev</span> *udev</code></em>, | |
374 | <em class="parameter"><code>const <span class="type">char</span> *syspath</code></em>);</pre> | |
375 | <p>Create new udev device, and fill in information from the sys | |
663996b3 | 376 | device and the udev database entry. The syspath is the absolute |
f47781d8 MP |
377 | path to the device, including the sys mount point.</p> |
378 | <p>The initial refcount is 1, and needs to be decremented to | |
379 | release the resources of the udev device.</p> | |
380 | <div class="refsect3"> | |
381 | <a name="id-1.2.4.6.5.6"></a><h4>Parameters</h4> | |
382 | <div class="informaltable"><table width="100%" border="0"> | |
663996b3 | 383 | <colgroup> |
f47781d8 MP |
384 | <col width="150px" class="parameters_name"> |
385 | <col class="parameters_description"> | |
386 | <col width="200px" class="parameters_annotations"> | |
663996b3 MS |
387 | </colgroup> |
388 | <tbody> | |
389 | <tr> | |
f47781d8 MP |
390 | <td class="parameter_name"><p>udev</p></td> |
391 | <td class="parameter_description"><p>udev library context</p></td> | |
392 | <td class="parameter_annotations"> </td> | |
663996b3 MS |
393 | </tr> |
394 | <tr> | |
f47781d8 MP |
395 | <td class="parameter_name"><p>syspath</p></td> |
396 | <td class="parameter_description"><p>sys device path including sys directory</p></td> | |
397 | <td class="parameter_annotations"> </td> | |
663996b3 MS |
398 | </tr> |
399 | </tbody> | |
400 | </table></div> | |
401 | </div> | |
f47781d8 MP |
402 | <div class="refsect3"> |
403 | <a name="id-1.2.4.6.5.7"></a><h4>Returns</h4> | |
404 | <p> a new udev device, or <span class="type">NULL</span>, if it does not exist</p> | |
405 | <p></p> | |
406 | </div> | |
407 | </div> | |
663996b3 MS |
408 | <hr> |
409 | <div class="refsect2"> | |
f47781d8 MP |
410 | <a name="udev-device-new-from-devnum"></a><h3>udev_device_new_from_devnum ()</h3> |
411 | <pre class="programlisting">struct <a class="link" href="libudev-udev-device.html#udev-device" title="struct udev_device"><span class="returnvalue">udev_device</span></a> * | |
412 | udev_device_new_from_devnum (<em class="parameter"><code><span class="type">struct udev</span> *udev</code></em>, | |
413 | <em class="parameter"><code><span class="type">char</span> type</code></em>, | |
414 | <em class="parameter"><code><span class="type">dev_t</span> devnum</code></em>);</pre> | |
415 | <p>Create new udev device, and fill in information from the sys | |
663996b3 MS |
416 | device and the udev database entry. The device is looked-up |
417 | by its major/minor number and type. Character and block device | |
f47781d8 MP |
418 | numbers are not unique across the two types.</p> |
419 | <p>The initial refcount is 1, and needs to be decremented to | |
420 | release the resources of the udev device.</p> | |
421 | <div class="refsect3"> | |
422 | <a name="id-1.2.4.6.6.6"></a><h4>Parameters</h4> | |
423 | <div class="informaltable"><table width="100%" border="0"> | |
663996b3 | 424 | <colgroup> |
f47781d8 MP |
425 | <col width="150px" class="parameters_name"> |
426 | <col class="parameters_description"> | |
427 | <col width="200px" class="parameters_annotations"> | |
663996b3 MS |
428 | </colgroup> |
429 | <tbody> | |
430 | <tr> | |
f47781d8 MP |
431 | <td class="parameter_name"><p>udev</p></td> |
432 | <td class="parameter_description"><p>udev library context</p></td> | |
433 | <td class="parameter_annotations"> </td> | |
663996b3 MS |
434 | </tr> |
435 | <tr> | |
f47781d8 MP |
436 | <td class="parameter_name"><p>type</p></td> |
437 | <td class="parameter_description"><p>char or block device</p></td> | |
438 | <td class="parameter_annotations"> </td> | |
663996b3 MS |
439 | </tr> |
440 | <tr> | |
f47781d8 MP |
441 | <td class="parameter_name"><p>devnum</p></td> |
442 | <td class="parameter_description"><p>device major/minor number</p></td> | |
443 | <td class="parameter_annotations"> </td> | |
663996b3 MS |
444 | </tr> |
445 | </tbody> | |
446 | </table></div> | |
447 | </div> | |
f47781d8 MP |
448 | <div class="refsect3"> |
449 | <a name="id-1.2.4.6.6.7"></a><h4>Returns</h4> | |
450 | <p> a new udev device, or <span class="type">NULL</span>, if it does not exist</p> | |
451 | <p></p> | |
452 | </div> | |
453 | </div> | |
663996b3 MS |
454 | <hr> |
455 | <div class="refsect2"> | |
f47781d8 MP |
456 | <a name="udev-device-new-from-subsystem-sysname"></a><h3>udev_device_new_from_subsystem_sysname ()</h3> |
457 | <pre class="programlisting">struct <a class="link" href="libudev-udev-device.html#udev-device" title="struct udev_device"><span class="returnvalue">udev_device</span></a> * | |
458 | udev_device_new_from_subsystem_sysname | |
459 | (<em class="parameter"><code><span class="type">struct udev</span> *udev</code></em>, | |
460 | <em class="parameter"><code>const <span class="type">char</span> *subsystem</code></em>, | |
461 | <em class="parameter"><code>const <span class="type">char</span> *sysname</code></em>);</pre> | |
462 | <p>Create new udev device, and fill in information from the sys device | |
663996b3 | 463 | and the udev database entry. The device is looked up by the subsystem |
f47781d8 MP |
464 | and name string of the device, like "mem" / "zero", or "block" / "sda".</p> |
465 | <p>The initial refcount is 1, and needs to be decremented to | |
466 | release the resources of the udev device.</p> | |
467 | <div class="refsect3"> | |
468 | <a name="id-1.2.4.6.7.6"></a><h4>Parameters</h4> | |
469 | <div class="informaltable"><table width="100%" border="0"> | |
663996b3 | 470 | <colgroup> |
f47781d8 MP |
471 | <col width="150px" class="parameters_name"> |
472 | <col class="parameters_description"> | |
473 | <col width="200px" class="parameters_annotations"> | |
663996b3 MS |
474 | </colgroup> |
475 | <tbody> | |
476 | <tr> | |
f47781d8 MP |
477 | <td class="parameter_name"><p>udev</p></td> |
478 | <td class="parameter_description"><p>udev library context</p></td> | |
479 | <td class="parameter_annotations"> </td> | |
663996b3 MS |
480 | </tr> |
481 | <tr> | |
f47781d8 MP |
482 | <td class="parameter_name"><p>subsystem</p></td> |
483 | <td class="parameter_description"><p>the subsystem of the device</p></td> | |
484 | <td class="parameter_annotations"> </td> | |
663996b3 MS |
485 | </tr> |
486 | <tr> | |
f47781d8 MP |
487 | <td class="parameter_name"><p>sysname</p></td> |
488 | <td class="parameter_description"><p>the name of the device</p></td> | |
489 | <td class="parameter_annotations"> </td> | |
663996b3 MS |
490 | </tr> |
491 | </tbody> | |
492 | </table></div> | |
493 | </div> | |
f47781d8 MP |
494 | <div class="refsect3"> |
495 | <a name="id-1.2.4.6.7.7"></a><h4>Returns</h4> | |
496 | <p> a new udev device, or <span class="type">NULL</span>, if it does not exist</p> | |
497 | <p></p> | |
498 | </div> | |
499 | </div> | |
663996b3 MS |
500 | <hr> |
501 | <div class="refsect2"> | |
f47781d8 MP |
502 | <a name="udev-device-new-from-device-id"></a><h3>udev_device_new_from_device_id ()</h3> |
503 | <pre class="programlisting">struct <a class="link" href="libudev-udev-device.html#udev-device" title="struct udev_device"><span class="returnvalue">udev_device</span></a> * | |
504 | udev_device_new_from_device_id (<em class="parameter"><code><span class="type">struct udev</span> *udev</code></em>, | |
505 | <em class="parameter"><code>const <span class="type">char</span> *id</code></em>);</pre> | |
506 | <p>Create new udev device, and fill in information from the sys | |
663996b3 MS |
507 | device and the udev database entry. The device is looked-up |
508 | by a special string: | |
509 | b8:2 - block device major:minor | |
510 | c128:1 - char device major:minor | |
511 | n3 - network device ifindex | |
f47781d8 MP |
512 | +sound:card29 - kernel driver core subsystem:device name</p> |
513 | <p>The initial refcount is 1, and needs to be decremented to | |
514 | release the resources of the udev device.</p> | |
515 | <div class="refsect3"> | |
516 | <a name="id-1.2.4.6.8.6"></a><h4>Parameters</h4> | |
517 | <div class="informaltable"><table width="100%" border="0"> | |
663996b3 | 518 | <colgroup> |
f47781d8 MP |
519 | <col width="150px" class="parameters_name"> |
520 | <col class="parameters_description"> | |
521 | <col width="200px" class="parameters_annotations"> | |
663996b3 MS |
522 | </colgroup> |
523 | <tbody> | |
524 | <tr> | |
f47781d8 MP |
525 | <td class="parameter_name"><p>udev</p></td> |
526 | <td class="parameter_description"><p>udev library context</p></td> | |
527 | <td class="parameter_annotations"> </td> | |
663996b3 MS |
528 | </tr> |
529 | <tr> | |
f47781d8 MP |
530 | <td class="parameter_name"><p>id</p></td> |
531 | <td class="parameter_description"><p>text string identifying a kernel device</p></td> | |
532 | <td class="parameter_annotations"> </td> | |
663996b3 MS |
533 | </tr> |
534 | </tbody> | |
535 | </table></div> | |
536 | </div> | |
f47781d8 MP |
537 | <div class="refsect3"> |
538 | <a name="id-1.2.4.6.8.7"></a><h4>Returns</h4> | |
539 | <p> a new udev device, or <span class="type">NULL</span>, if it does not exist</p> | |
540 | <p></p> | |
541 | </div> | |
542 | </div> | |
663996b3 MS |
543 | <hr> |
544 | <div class="refsect2"> | |
f47781d8 MP |
545 | <a name="udev-device-new-from-environment"></a><h3>udev_device_new_from_environment ()</h3> |
546 | <pre class="programlisting">struct <a class="link" href="libudev-udev-device.html#udev-device" title="struct udev_device"><span class="returnvalue">udev_device</span></a> * | |
547 | udev_device_new_from_environment (<em class="parameter"><code><span class="type">struct udev</span> *udev</code></em>);</pre> | |
548 | <p>Create new udev device, and fill in information from the | |
663996b3 MS |
549 | current process environment. This only works reliable if |
550 | the process is called from a udev rule. It is usually used | |
f47781d8 MP |
551 | for tools executed from IMPORT= rules.</p> |
552 | <p>The initial refcount is 1, and needs to be decremented to | |
553 | release the resources of the udev device.</p> | |
554 | <div class="refsect3"> | |
555 | <a name="id-1.2.4.6.9.6"></a><h4>Parameters</h4> | |
556 | <div class="informaltable"><table width="100%" border="0"> | |
663996b3 | 557 | <colgroup> |
f47781d8 MP |
558 | <col width="150px" class="parameters_name"> |
559 | <col class="parameters_description"> | |
560 | <col width="200px" class="parameters_annotations"> | |
663996b3 | 561 | </colgroup> |
f47781d8 MP |
562 | <tbody><tr> |
563 | <td class="parameter_name"><p>udev</p></td> | |
564 | <td class="parameter_description"><p>udev library context</p></td> | |
565 | <td class="parameter_annotations"> </td> | |
566 | </tr></tbody> | |
663996b3 MS |
567 | </table></div> |
568 | </div> | |
f47781d8 MP |
569 | <div class="refsect3"> |
570 | <a name="id-1.2.4.6.9.7"></a><h4>Returns</h4> | |
571 | <p> a new udev device, or <span class="type">NULL</span>, if it does not exist</p> | |
572 | <p></p> | |
573 | </div> | |
574 | </div> | |
663996b3 MS |
575 | <hr> |
576 | <div class="refsect2"> | |
f47781d8 MP |
577 | <a name="udev-device-get-parent"></a><h3>udev_device_get_parent ()</h3> |
578 | <pre class="programlisting">struct <a class="link" href="libudev-udev-device.html#udev-device" title="struct udev_device"><span class="returnvalue">udev_device</span></a> * | |
579 | udev_device_get_parent (<em class="parameter"><code><span class="type">struct udev_device</span> *udev_device</code></em>);</pre> | |
580 | <p>Find the next parent device, and fill in information from the sys | |
581 | device and the udev database entry.</p> | |
582 | <p>Returned device is not referenced. It is attached to the child | |
583 | device, and will be cleaned up when the child device is cleaned up.</p> | |
584 | <p>It is not necessarily just the upper level directory, empty or not | |
585 | recognized sys directories are ignored.</p> | |
586 | <p>It can be called as many times as needed, without caring about | |
587 | references.</p> | |
588 | <div class="refsect3"> | |
589 | <a name="id-1.2.4.6.10.8"></a><h4>Parameters</h4> | |
590 | <div class="informaltable"><table width="100%" border="0"> | |
663996b3 | 591 | <colgroup> |
f47781d8 MP |
592 | <col width="150px" class="parameters_name"> |
593 | <col class="parameters_description"> | |
594 | <col width="200px" class="parameters_annotations"> | |
663996b3 | 595 | </colgroup> |
f47781d8 MP |
596 | <tbody><tr> |
597 | <td class="parameter_name"><p>udev_device</p></td> | |
598 | <td class="parameter_description"><p>the device to start searching from</p></td> | |
599 | <td class="parameter_annotations"> </td> | |
600 | </tr></tbody> | |
663996b3 MS |
601 | </table></div> |
602 | </div> | |
f47781d8 MP |
603 | <div class="refsect3"> |
604 | <a name="id-1.2.4.6.10.9"></a><h4>Returns</h4> | |
605 | <p> a new udev device, or <span class="type">NULL</span>, if it no parent exist.</p> | |
606 | <p></p> | |
607 | </div> | |
608 | </div> | |
663996b3 MS |
609 | <hr> |
610 | <div class="refsect2"> | |
f47781d8 MP |
611 | <a name="udev-device-get-parent-with-subsystem-devtype"></a><h3>udev_device_get_parent_with_subsystem_devtype ()</h3> |
612 | <pre class="programlisting">struct <a class="link" href="libudev-udev-device.html#udev-device" title="struct udev_device"><span class="returnvalue">udev_device</span></a> * | |
613 | udev_device_get_parent_with_subsystem_devtype | |
614 | (<em class="parameter"><code><span class="type">struct udev_device</span> *udev_device</code></em>, | |
615 | <em class="parameter"><code>const <span class="type">char</span> *subsystem</code></em>, | |
616 | <em class="parameter"><code>const <span class="type">char</span> *devtype</code></em>);</pre> | |
617 | <p>Find the next parent device, with a matching subsystem and devtype | |
663996b3 | 618 | value, and fill in information from the sys device and the udev |
f47781d8 MP |
619 | database entry.</p> |
620 | <p>If devtype is <span class="type">NULL</span>, only subsystem is checked, and any devtype will | |
621 | match.</p> | |
622 | <p>Returned device is not referenced. It is attached to the child | |
623 | device, and will be cleaned up when the child device is cleaned up.</p> | |
624 | <p>It can be called as many times as needed, without caring about | |
625 | references.</p> | |
626 | <div class="refsect3"> | |
627 | <a name="id-1.2.4.6.11.8"></a><h4>Parameters</h4> | |
628 | <div class="informaltable"><table width="100%" border="0"> | |
663996b3 | 629 | <colgroup> |
f47781d8 MP |
630 | <col width="150px" class="parameters_name"> |
631 | <col class="parameters_description"> | |
632 | <col width="200px" class="parameters_annotations"> | |
663996b3 MS |
633 | </colgroup> |
634 | <tbody> | |
635 | <tr> | |
f47781d8 MP |
636 | <td class="parameter_name"><p>udev_device</p></td> |
637 | <td class="parameter_description"><p>udev device to start searching from</p></td> | |
638 | <td class="parameter_annotations"> </td> | |
663996b3 MS |
639 | </tr> |
640 | <tr> | |
f47781d8 MP |
641 | <td class="parameter_name"><p>subsystem</p></td> |
642 | <td class="parameter_description"><p>the subsystem of the device</p></td> | |
643 | <td class="parameter_annotations"> </td> | |
663996b3 MS |
644 | </tr> |
645 | <tr> | |
f47781d8 MP |
646 | <td class="parameter_name"><p>devtype</p></td> |
647 | <td class="parameter_description"><p>the type (DEVTYPE) of the device</p></td> | |
648 | <td class="parameter_annotations"> </td> | |
663996b3 MS |
649 | </tr> |
650 | </tbody> | |
651 | </table></div> | |
652 | </div> | |
f47781d8 MP |
653 | <div class="refsect3"> |
654 | <a name="id-1.2.4.6.11.9"></a><h4>Returns</h4> | |
655 | <p> a new udev device, or <span class="type">NULL</span> if no matching parent exists.</p> | |
656 | <p></p> | |
657 | </div> | |
658 | </div> | |
663996b3 MS |
659 | <hr> |
660 | <div class="refsect2"> | |
f47781d8 MP |
661 | <a name="udev-device-get-devpath"></a><h3>udev_device_get_devpath ()</h3> |
662 | <pre class="programlisting">const <span class="returnvalue">char</span> * | |
663 | udev_device_get_devpath (<em class="parameter"><code><span class="type">struct udev_device</span> *udev_device</code></em>);</pre> | |
664 | <p>Retrieve the kernel devpath value of the udev device. The path | |
665 | does not contain the sys mount point, and starts with a '/'.</p> | |
666 | <div class="refsect3"> | |
667 | <a name="id-1.2.4.6.12.5"></a><h4>Parameters</h4> | |
668 | <div class="informaltable"><table width="100%" border="0"> | |
663996b3 | 669 | <colgroup> |
f47781d8 MP |
670 | <col width="150px" class="parameters_name"> |
671 | <col class="parameters_description"> | |
672 | <col width="200px" class="parameters_annotations"> | |
663996b3 | 673 | </colgroup> |
f47781d8 MP |
674 | <tbody><tr> |
675 | <td class="parameter_name"><p>udev_device</p></td> | |
676 | <td class="parameter_description"><p>udev device</p></td> | |
677 | <td class="parameter_annotations"> </td> | |
678 | </tr></tbody> | |
663996b3 MS |
679 | </table></div> |
680 | </div> | |
f47781d8 MP |
681 | <div class="refsect3"> |
682 | <a name="id-1.2.4.6.12.6"></a><h4>Returns</h4> | |
683 | <p> the devpath of the udev device</p> | |
684 | <p></p> | |
685 | </div> | |
686 | </div> | |
663996b3 MS |
687 | <hr> |
688 | <div class="refsect2"> | |
f47781d8 MP |
689 | <a name="udev-device-get-subsystem"></a><h3>udev_device_get_subsystem ()</h3> |
690 | <pre class="programlisting">const <span class="returnvalue">char</span> * | |
691 | udev_device_get_subsystem (<em class="parameter"><code><span class="type">struct udev_device</span> *udev_device</code></em>);</pre> | |
692 | <p>Retrieve the subsystem string of the udev device. The string does not | |
693 | contain any "/".</p> | |
694 | <div class="refsect3"> | |
695 | <a name="id-1.2.4.6.13.5"></a><h4>Parameters</h4> | |
696 | <div class="informaltable"><table width="100%" border="0"> | |
663996b3 | 697 | <colgroup> |
f47781d8 MP |
698 | <col width="150px" class="parameters_name"> |
699 | <col class="parameters_description"> | |
700 | <col width="200px" class="parameters_annotations"> | |
663996b3 | 701 | </colgroup> |
f47781d8 MP |
702 | <tbody><tr> |
703 | <td class="parameter_name"><p>udev_device</p></td> | |
704 | <td class="parameter_description"><p>udev device</p></td> | |
705 | <td class="parameter_annotations"> </td> | |
706 | </tr></tbody> | |
663996b3 MS |
707 | </table></div> |
708 | </div> | |
f47781d8 MP |
709 | <div class="refsect3"> |
710 | <a name="id-1.2.4.6.13.6"></a><h4>Returns</h4> | |
711 | <p> the subsystem name of the udev device, or <span class="type">NULL</span> if it can not be determined</p> | |
712 | <p></p> | |
713 | </div> | |
714 | </div> | |
663996b3 MS |
715 | <hr> |
716 | <div class="refsect2"> | |
f47781d8 MP |
717 | <a name="udev-device-get-devtype"></a><h3>udev_device_get_devtype ()</h3> |
718 | <pre class="programlisting">const <span class="returnvalue">char</span> * | |
719 | udev_device_get_devtype (<em class="parameter"><code><span class="type">struct udev_device</span> *udev_device</code></em>);</pre> | |
720 | <p>Retrieve the devtype string of the udev device.</p> | |
721 | <div class="refsect3"> | |
722 | <a name="id-1.2.4.6.14.5"></a><h4>Parameters</h4> | |
723 | <div class="informaltable"><table width="100%" border="0"> | |
663996b3 | 724 | <colgroup> |
f47781d8 MP |
725 | <col width="150px" class="parameters_name"> |
726 | <col class="parameters_description"> | |
727 | <col width="200px" class="parameters_annotations"> | |
663996b3 | 728 | </colgroup> |
f47781d8 MP |
729 | <tbody><tr> |
730 | <td class="parameter_name"><p>udev_device</p></td> | |
731 | <td class="parameter_description"><p>udev device</p></td> | |
732 | <td class="parameter_annotations"> </td> | |
733 | </tr></tbody> | |
663996b3 MS |
734 | </table></div> |
735 | </div> | |
f47781d8 MP |
736 | <div class="refsect3"> |
737 | <a name="id-1.2.4.6.14.6"></a><h4>Returns</h4> | |
738 | <p> the devtype name of the udev device, or <span class="type">NULL</span> if it can not be determined</p> | |
739 | <p></p> | |
740 | </div> | |
741 | </div> | |
663996b3 MS |
742 | <hr> |
743 | <div class="refsect2"> | |
f47781d8 MP |
744 | <a name="udev-device-get-syspath"></a><h3>udev_device_get_syspath ()</h3> |
745 | <pre class="programlisting">const <span class="returnvalue">char</span> * | |
746 | udev_device_get_syspath (<em class="parameter"><code><span class="type">struct udev_device</span> *udev_device</code></em>);</pre> | |
747 | <p>Retrieve the sys path of the udev device. The path is an | |
748 | absolute path and starts with the sys mount point.</p> | |
749 | <div class="refsect3"> | |
750 | <a name="id-1.2.4.6.15.5"></a><h4>Parameters</h4> | |
751 | <div class="informaltable"><table width="100%" border="0"> | |
663996b3 | 752 | <colgroup> |
f47781d8 MP |
753 | <col width="150px" class="parameters_name"> |
754 | <col class="parameters_description"> | |
755 | <col width="200px" class="parameters_annotations"> | |
663996b3 | 756 | </colgroup> |
f47781d8 MP |
757 | <tbody><tr> |
758 | <td class="parameter_name"><p>udev_device</p></td> | |
759 | <td class="parameter_description"><p>udev device</p></td> | |
760 | <td class="parameter_annotations"> </td> | |
761 | </tr></tbody> | |
663996b3 MS |
762 | </table></div> |
763 | </div> | |
f47781d8 MP |
764 | <div class="refsect3"> |
765 | <a name="id-1.2.4.6.15.6"></a><h4>Returns</h4> | |
766 | <p> the sys path of the udev device</p> | |
767 | <p></p> | |
768 | </div> | |
769 | </div> | |
663996b3 MS |
770 | <hr> |
771 | <div class="refsect2"> | |
f47781d8 MP |
772 | <a name="udev-device-get-sysname"></a><h3>udev_device_get_sysname ()</h3> |
773 | <pre class="programlisting">const <span class="returnvalue">char</span> * | |
774 | udev_device_get_sysname (<em class="parameter"><code><span class="type">struct udev_device</span> *udev_device</code></em>);</pre> | |
775 | <p>Get the kernel device name in /sys.</p> | |
776 | <div class="refsect3"> | |
777 | <a name="id-1.2.4.6.16.5"></a><h4>Parameters</h4> | |
778 | <div class="informaltable"><table width="100%" border="0"> | |
663996b3 | 779 | <colgroup> |
f47781d8 MP |
780 | <col width="150px" class="parameters_name"> |
781 | <col class="parameters_description"> | |
782 | <col width="200px" class="parameters_annotations"> | |
663996b3 | 783 | </colgroup> |
f47781d8 MP |
784 | <tbody><tr> |
785 | <td class="parameter_name"><p>udev_device</p></td> | |
786 | <td class="parameter_description"><p>udev device</p></td> | |
787 | <td class="parameter_annotations"> </td> | |
788 | </tr></tbody> | |
663996b3 MS |
789 | </table></div> |
790 | </div> | |
f47781d8 MP |
791 | <div class="refsect3"> |
792 | <a name="id-1.2.4.6.16.6"></a><h4>Returns</h4> | |
793 | <p> the name string of the device device</p> | |
794 | <p></p> | |
795 | </div> | |
796 | </div> | |
663996b3 MS |
797 | <hr> |
798 | <div class="refsect2"> | |
f47781d8 MP |
799 | <a name="udev-device-get-sysnum"></a><h3>udev_device_get_sysnum ()</h3> |
800 | <pre class="programlisting">const <span class="returnvalue">char</span> * | |
801 | udev_device_get_sysnum (<em class="parameter"><code><span class="type">struct udev_device</span> *udev_device</code></em>);</pre> | |
802 | <p>Get the instance number of the device.</p> | |
803 | <div class="refsect3"> | |
804 | <a name="id-1.2.4.6.17.5"></a><h4>Parameters</h4> | |
805 | <div class="informaltable"><table width="100%" border="0"> | |
663996b3 | 806 | <colgroup> |
f47781d8 MP |
807 | <col width="150px" class="parameters_name"> |
808 | <col class="parameters_description"> | |
809 | <col width="200px" class="parameters_annotations"> | |
663996b3 | 810 | </colgroup> |
f47781d8 MP |
811 | <tbody><tr> |
812 | <td class="parameter_name"><p>udev_device</p></td> | |
813 | <td class="parameter_description"><p>udev device</p></td> | |
814 | <td class="parameter_annotations"> </td> | |
815 | </tr></tbody> | |
663996b3 MS |
816 | </table></div> |
817 | </div> | |
f47781d8 MP |
818 | <div class="refsect3"> |
819 | <a name="id-1.2.4.6.17.6"></a><h4>Returns</h4> | |
820 | <p> the trailing number string of the device name</p> | |
821 | <p></p> | |
822 | </div> | |
823 | </div> | |
663996b3 MS |
824 | <hr> |
825 | <div class="refsect2"> | |
f47781d8 MP |
826 | <a name="udev-device-get-devnode"></a><h3>udev_device_get_devnode ()</h3> |
827 | <pre class="programlisting">const <span class="returnvalue">char</span> * | |
828 | udev_device_get_devnode (<em class="parameter"><code><span class="type">struct udev_device</span> *udev_device</code></em>);</pre> | |
829 | <p>Retrieve the device node file name belonging to the udev device. | |
830 | The path is an absolute path, and starts with the device directory.</p> | |
831 | <div class="refsect3"> | |
832 | <a name="id-1.2.4.6.18.5"></a><h4>Parameters</h4> | |
833 | <div class="informaltable"><table width="100%" border="0"> | |
663996b3 | 834 | <colgroup> |
f47781d8 MP |
835 | <col width="150px" class="parameters_name"> |
836 | <col class="parameters_description"> | |
837 | <col width="200px" class="parameters_annotations"> | |
663996b3 | 838 | </colgroup> |
f47781d8 MP |
839 | <tbody><tr> |
840 | <td class="parameter_name"><p>udev_device</p></td> | |
841 | <td class="parameter_description"><p>udev device</p></td> | |
842 | <td class="parameter_annotations"> </td> | |
843 | </tr></tbody> | |
663996b3 MS |
844 | </table></div> |
845 | </div> | |
f47781d8 MP |
846 | <div class="refsect3"> |
847 | <a name="id-1.2.4.6.18.6"></a><h4>Returns</h4> | |
848 | <p> the device node file name of the udev device, or <span class="type">NULL</span> if no device node exists</p> | |
849 | <p></p> | |
850 | </div> | |
851 | </div> | |
663996b3 MS |
852 | <hr> |
853 | <div class="refsect2"> | |
f47781d8 MP |
854 | <a name="udev-device-get-is-initialized"></a><h3>udev_device_get_is_initialized ()</h3> |
855 | <pre class="programlisting"><span class="returnvalue">int</span> | |
856 | udev_device_get_is_initialized (<em class="parameter"><code><span class="type">struct udev_device</span> *udev_device</code></em>);</pre> | |
857 | <p>Check if udev has already handled the device and has set up | |
663996b3 | 858 | device node permissions and context, or has renamed a network |
f47781d8 MP |
859 | device.</p> |
860 | <p>This is only implemented for devices with a device node | |
861 | or network interfaces. All other devices return 1 here.</p> | |
862 | <div class="refsect3"> | |
863 | <a name="id-1.2.4.6.19.6"></a><h4>Parameters</h4> | |
864 | <div class="informaltable"><table width="100%" border="0"> | |
663996b3 | 865 | <colgroup> |
f47781d8 MP |
866 | <col width="150px" class="parameters_name"> |
867 | <col class="parameters_description"> | |
868 | <col width="200px" class="parameters_annotations"> | |
663996b3 | 869 | </colgroup> |
f47781d8 MP |
870 | <tbody><tr> |
871 | <td class="parameter_name"><p>udev_device</p></td> | |
872 | <td class="parameter_description"><p>udev device</p></td> | |
873 | <td class="parameter_annotations"> </td> | |
874 | </tr></tbody> | |
663996b3 MS |
875 | </table></div> |
876 | </div> | |
f47781d8 MP |
877 | <div class="refsect3"> |
878 | <a name="id-1.2.4.6.19.7"></a><h4>Returns</h4> | |
879 | <p> 1 if the device is set up. 0 otherwise.</p> | |
880 | <p></p> | |
881 | </div> | |
882 | </div> | |
663996b3 MS |
883 | <hr> |
884 | <div class="refsect2"> | |
f47781d8 MP |
885 | <a name="udev-device-get-devlinks-list-entry"></a><h3>udev_device_get_devlinks_list_entry ()</h3> |
886 | <pre class="programlisting">struct <a class="link" href="libudev-udev-list.html#udev-list-entry" title="struct udev_list_entry"><span class="returnvalue">udev_list_entry</span></a> * | |
887 | udev_device_get_devlinks_list_entry (<em class="parameter"><code><span class="type">struct udev_device</span> *udev_device</code></em>);</pre> | |
888 | <p>Retrieve the list of device links pointing to the device file of | |
663996b3 | 889 | the udev device. The next list entry can be retrieved with |
f47781d8 | 890 | <a class="link" href="libudev-udev-list.html#udev-list-entry-get-next" title="udev_list_entry_get_next ()"><code class="function">udev_list_entry_get_next()</code></a>, which returns <span class="type">NULL</span> if no more entries exist. |
663996b3 | 891 | The devlink path can be retrieved from the list entry by |
f47781d8 MP |
892 | <a class="link" href="libudev-udev-list.html#udev-list-entry-get-name" title="udev_list_entry_get_name ()"><code class="function">udev_list_entry_get_name()</code></a>. The path is an absolute path, and starts with |
893 | the device directory.</p> | |
894 | <div class="refsect3"> | |
895 | <a name="id-1.2.4.6.20.5"></a><h4>Parameters</h4> | |
896 | <div class="informaltable"><table width="100%" border="0"> | |
663996b3 | 897 | <colgroup> |
f47781d8 MP |
898 | <col width="150px" class="parameters_name"> |
899 | <col class="parameters_description"> | |
900 | <col width="200px" class="parameters_annotations"> | |
663996b3 | 901 | </colgroup> |
f47781d8 MP |
902 | <tbody><tr> |
903 | <td class="parameter_name"><p>udev_device</p></td> | |
904 | <td class="parameter_description"><p>udev device</p></td> | |
905 | <td class="parameter_annotations"> </td> | |
906 | </tr></tbody> | |
663996b3 MS |
907 | </table></div> |
908 | </div> | |
f47781d8 MP |
909 | <div class="refsect3"> |
910 | <a name="id-1.2.4.6.20.6"></a><h4>Returns</h4> | |
911 | <p> the first entry of the device node link list</p> | |
912 | <p></p> | |
913 | </div> | |
914 | </div> | |
663996b3 MS |
915 | <hr> |
916 | <div class="refsect2"> | |
f47781d8 MP |
917 | <a name="udev-device-get-properties-list-entry"></a><h3>udev_device_get_properties_list_entry ()</h3> |
918 | <pre class="programlisting">struct <a class="link" href="libudev-udev-list.html#udev-list-entry" title="struct udev_list_entry"><span class="returnvalue">udev_list_entry</span></a> * | |
919 | udev_device_get_properties_list_entry (<em class="parameter"><code><span class="type">struct udev_device</span> *udev_device</code></em>);</pre> | |
920 | <p>Retrieve the list of key/value device properties of the udev | |
921 | device. The next list entry can be retrieved with <a class="link" href="libudev-udev-list.html#udev-list-entry-get-next" title="udev_list_entry_get_next ()"><code class="function">udev_list_entry_get_next()</code></a>, | |
663996b3 | 922 | which returns <span class="type">NULL</span> if no more entries exist. The property name |
f47781d8 MP |
923 | can be retrieved from the list entry by <a class="link" href="libudev-udev-list.html#udev-list-entry-get-name" title="udev_list_entry_get_name ()"><code class="function">udev_list_entry_get_name()</code></a>, |
924 | the property value by <a class="link" href="libudev-udev-list.html#udev-list-entry-get-value" title="udev_list_entry_get_value ()"><code class="function">udev_list_entry_get_value()</code></a>.</p> | |
925 | <div class="refsect3"> | |
926 | <a name="id-1.2.4.6.21.5"></a><h4>Parameters</h4> | |
927 | <div class="informaltable"><table width="100%" border="0"> | |
663996b3 | 928 | <colgroup> |
f47781d8 MP |
929 | <col width="150px" class="parameters_name"> |
930 | <col class="parameters_description"> | |
931 | <col width="200px" class="parameters_annotations"> | |
663996b3 | 932 | </colgroup> |
f47781d8 MP |
933 | <tbody><tr> |
934 | <td class="parameter_name"><p>udev_device</p></td> | |
935 | <td class="parameter_description"><p>udev device</p></td> | |
936 | <td class="parameter_annotations"> </td> | |
937 | </tr></tbody> | |
663996b3 MS |
938 | </table></div> |
939 | </div> | |
f47781d8 MP |
940 | <div class="refsect3"> |
941 | <a name="id-1.2.4.6.21.6"></a><h4>Returns</h4> | |
942 | <p> the first entry of the property list</p> | |
943 | <p></p> | |
944 | </div> | |
945 | </div> | |
663996b3 MS |
946 | <hr> |
947 | <div class="refsect2"> | |
f47781d8 MP |
948 | <a name="udev-device-get-tags-list-entry"></a><h3>udev_device_get_tags_list_entry ()</h3> |
949 | <pre class="programlisting">struct <a class="link" href="libudev-udev-list.html#udev-list-entry" title="struct udev_list_entry"><span class="returnvalue">udev_list_entry</span></a> * | |
950 | udev_device_get_tags_list_entry (<em class="parameter"><code><span class="type">struct udev_device</span> *udev_device</code></em>);</pre> | |
951 | <p>Retrieve the list of tags attached to the udev device. The next | |
952 | list entry can be retrieved with <a class="link" href="libudev-udev-list.html#udev-list-entry-get-next" title="udev_list_entry_get_next ()"><code class="function">udev_list_entry_get_next()</code></a>, | |
663996b3 | 953 | which returns <span class="type">NULL</span> if no more entries exist. The tag string |
f47781d8 MP |
954 | can be retrieved from the list entry by <a class="link" href="libudev-udev-list.html#udev-list-entry-get-name" title="udev_list_entry_get_name ()"><code class="function">udev_list_entry_get_name()</code></a>.</p> |
955 | <div class="refsect3"> | |
956 | <a name="id-1.2.4.6.22.5"></a><h4>Parameters</h4> | |
957 | <div class="informaltable"><table width="100%" border="0"> | |
663996b3 | 958 | <colgroup> |
f47781d8 MP |
959 | <col width="150px" class="parameters_name"> |
960 | <col class="parameters_description"> | |
961 | <col width="200px" class="parameters_annotations"> | |
663996b3 | 962 | </colgroup> |
f47781d8 MP |
963 | <tbody><tr> |
964 | <td class="parameter_name"><p>udev_device</p></td> | |
965 | <td class="parameter_description"><p>udev device</p></td> | |
966 | <td class="parameter_annotations"> </td> | |
967 | </tr></tbody> | |
663996b3 MS |
968 | </table></div> |
969 | </div> | |
f47781d8 MP |
970 | <div class="refsect3"> |
971 | <a name="id-1.2.4.6.22.6"></a><h4>Returns</h4> | |
972 | <p> the first entry of the tag list</p> | |
973 | <p></p> | |
974 | </div> | |
975 | </div> | |
663996b3 MS |
976 | <hr> |
977 | <div class="refsect2"> | |
f47781d8 MP |
978 | <a name="udev-device-get-property-value"></a><h3>udev_device_get_property_value ()</h3> |
979 | <pre class="programlisting">const <span class="returnvalue">char</span> * | |
980 | udev_device_get_property_value (<em class="parameter"><code><span class="type">struct udev_device</span> *udev_device</code></em>, | |
981 | <em class="parameter"><code>const <span class="type">char</span> *key</code></em>);</pre> | |
982 | <p>Get the value of a given property.</p> | |
983 | <div class="refsect3"> | |
984 | <a name="id-1.2.4.6.23.5"></a><h4>Parameters</h4> | |
985 | <div class="informaltable"><table width="100%" border="0"> | |
663996b3 | 986 | <colgroup> |
f47781d8 MP |
987 | <col width="150px" class="parameters_name"> |
988 | <col class="parameters_description"> | |
989 | <col width="200px" class="parameters_annotations"> | |
663996b3 MS |
990 | </colgroup> |
991 | <tbody> | |
992 | <tr> | |
f47781d8 MP |
993 | <td class="parameter_name"><p>udev_device</p></td> |
994 | <td class="parameter_description"><p>udev device</p></td> | |
995 | <td class="parameter_annotations"> </td> | |
663996b3 MS |
996 | </tr> |
997 | <tr> | |
f47781d8 MP |
998 | <td class="parameter_name"><p>key</p></td> |
999 | <td class="parameter_description"><p>property name</p></td> | |
1000 | <td class="parameter_annotations"> </td> | |
663996b3 MS |
1001 | </tr> |
1002 | </tbody> | |
1003 | </table></div> | |
1004 | </div> | |
f47781d8 MP |
1005 | <div class="refsect3"> |
1006 | <a name="id-1.2.4.6.23.6"></a><h4>Returns</h4> | |
1007 | <p> the property string, or <span class="type">NULL</span> if there is no such property.</p> | |
1008 | <p></p> | |
1009 | </div> | |
1010 | </div> | |
663996b3 MS |
1011 | <hr> |
1012 | <div class="refsect2"> | |
f47781d8 MP |
1013 | <a name="udev-device-get-driver"></a><h3>udev_device_get_driver ()</h3> |
1014 | <pre class="programlisting">const <span class="returnvalue">char</span> * | |
1015 | udev_device_get_driver (<em class="parameter"><code><span class="type">struct udev_device</span> *udev_device</code></em>);</pre> | |
1016 | <p>Get the kernel driver name.</p> | |
1017 | <div class="refsect3"> | |
1018 | <a name="id-1.2.4.6.24.5"></a><h4>Parameters</h4> | |
1019 | <div class="informaltable"><table width="100%" border="0"> | |
663996b3 | 1020 | <colgroup> |
f47781d8 MP |
1021 | <col width="150px" class="parameters_name"> |
1022 | <col class="parameters_description"> | |
1023 | <col width="200px" class="parameters_annotations"> | |
663996b3 | 1024 | </colgroup> |
f47781d8 MP |
1025 | <tbody><tr> |
1026 | <td class="parameter_name"><p>udev_device</p></td> | |
1027 | <td class="parameter_description"><p>udev device</p></td> | |
1028 | <td class="parameter_annotations"> </td> | |
1029 | </tr></tbody> | |
663996b3 MS |
1030 | </table></div> |
1031 | </div> | |
f47781d8 MP |
1032 | <div class="refsect3"> |
1033 | <a name="id-1.2.4.6.24.6"></a><h4>Returns</h4> | |
1034 | <p> the driver name string, or <span class="type">NULL</span> if there is no driver attached.</p> | |
1035 | <p></p> | |
1036 | </div> | |
1037 | </div> | |
663996b3 MS |
1038 | <hr> |
1039 | <div class="refsect2"> | |
f47781d8 MP |
1040 | <a name="udev-device-get-devnum"></a><h3>udev_device_get_devnum ()</h3> |
1041 | <pre class="programlisting"><span class="returnvalue">dev_t</span> | |
1042 | udev_device_get_devnum (<em class="parameter"><code><span class="type">struct udev_device</span> *udev_device</code></em>);</pre> | |
1043 | <p>Get the device major/minor number.</p> | |
1044 | <div class="refsect3"> | |
1045 | <a name="id-1.2.4.6.25.5"></a><h4>Parameters</h4> | |
1046 | <div class="informaltable"><table width="100%" border="0"> | |
663996b3 | 1047 | <colgroup> |
f47781d8 MP |
1048 | <col width="150px" class="parameters_name"> |
1049 | <col class="parameters_description"> | |
1050 | <col width="200px" class="parameters_annotations"> | |
663996b3 | 1051 | </colgroup> |
f47781d8 MP |
1052 | <tbody><tr> |
1053 | <td class="parameter_name"><p>udev_device</p></td> | |
1054 | <td class="parameter_description"><p>udev device</p></td> | |
1055 | <td class="parameter_annotations"> </td> | |
1056 | </tr></tbody> | |
663996b3 MS |
1057 | </table></div> |
1058 | </div> | |
f47781d8 MP |
1059 | <div class="refsect3"> |
1060 | <a name="id-1.2.4.6.25.6"></a><h4>Returns</h4> | |
1061 | <p> the dev_t number.</p> | |
1062 | <p></p> | |
1063 | </div> | |
1064 | </div> | |
663996b3 MS |
1065 | <hr> |
1066 | <div class="refsect2"> | |
f47781d8 MP |
1067 | <a name="udev-device-get-action"></a><h3>udev_device_get_action ()</h3> |
1068 | <pre class="programlisting">const <span class="returnvalue">char</span> * | |
1069 | udev_device_get_action (<em class="parameter"><code><span class="type">struct udev_device</span> *udev_device</code></em>);</pre> | |
1070 | <p>This is only valid if the device was received through a monitor. Devices read from | |
663996b3 | 1071 | sys do not have an action string. Usual actions are: add, remove, change, online, |
f47781d8 MP |
1072 | offline.</p> |
1073 | <div class="refsect3"> | |
1074 | <a name="id-1.2.4.6.26.5"></a><h4>Parameters</h4> | |
1075 | <div class="informaltable"><table width="100%" border="0"> | |
663996b3 | 1076 | <colgroup> |
f47781d8 MP |
1077 | <col width="150px" class="parameters_name"> |
1078 | <col class="parameters_description"> | |
1079 | <col width="200px" class="parameters_annotations"> | |
663996b3 | 1080 | </colgroup> |
f47781d8 MP |
1081 | <tbody><tr> |
1082 | <td class="parameter_name"><p>udev_device</p></td> | |
1083 | <td class="parameter_description"><p>udev device</p></td> | |
1084 | <td class="parameter_annotations"> </td> | |
1085 | </tr></tbody> | |
663996b3 MS |
1086 | </table></div> |
1087 | </div> | |
f47781d8 MP |
1088 | <div class="refsect3"> |
1089 | <a name="id-1.2.4.6.26.6"></a><h4>Returns</h4> | |
1090 | <p> the kernel action value, or <span class="type">NULL</span> if there is no action value available.</p> | |
1091 | <p></p> | |
1092 | </div> | |
1093 | </div> | |
663996b3 MS |
1094 | <hr> |
1095 | <div class="refsect2"> | |
f47781d8 MP |
1096 | <a name="udev-device-get-sysattr-value"></a><h3>udev_device_get_sysattr_value ()</h3> |
1097 | <pre class="programlisting">const <span class="returnvalue">char</span> * | |
1098 | udev_device_get_sysattr_value (<em class="parameter"><code><span class="type">struct udev_device</span> *udev_device</code></em>, | |
1099 | <em class="parameter"><code>const <span class="type">char</span> *sysattr</code></em>);</pre> | |
1100 | <p>The retrieved value is cached in the device. Repeated calls will return the same | |
1101 | value and not open the attribute again.</p> | |
1102 | <div class="refsect3"> | |
1103 | <a name="id-1.2.4.6.27.5"></a><h4>Parameters</h4> | |
1104 | <div class="informaltable"><table width="100%" border="0"> | |
663996b3 | 1105 | <colgroup> |
f47781d8 MP |
1106 | <col width="150px" class="parameters_name"> |
1107 | <col class="parameters_description"> | |
1108 | <col width="200px" class="parameters_annotations"> | |
663996b3 MS |
1109 | </colgroup> |
1110 | <tbody> | |
1111 | <tr> | |
f47781d8 MP |
1112 | <td class="parameter_name"><p>udev_device</p></td> |
1113 | <td class="parameter_description"><p>udev device</p></td> | |
1114 | <td class="parameter_annotations"> </td> | |
663996b3 MS |
1115 | </tr> |
1116 | <tr> | |
f47781d8 MP |
1117 | <td class="parameter_name"><p>sysattr</p></td> |
1118 | <td class="parameter_description"><p>attribute name</p></td> | |
1119 | <td class="parameter_annotations"> </td> | |
663996b3 MS |
1120 | </tr> |
1121 | </tbody> | |
1122 | </table></div> | |
1123 | </div> | |
f47781d8 MP |
1124 | <div class="refsect3"> |
1125 | <a name="id-1.2.4.6.27.6"></a><h4>Returns</h4> | |
1126 | <p> the content of a sys attribute file, or <span class="type">NULL</span> if there is no sys attribute value.</p> | |
1127 | <p></p> | |
1128 | </div> | |
1129 | </div> | |
663996b3 MS |
1130 | <hr> |
1131 | <div class="refsect2"> | |
f47781d8 MP |
1132 | <a name="udev-device-set-sysattr-value"></a><h3>udev_device_set_sysattr_value ()</h3> |
1133 | <pre class="programlisting"><span class="returnvalue">int</span> | |
1134 | udev_device_set_sysattr_value (<em class="parameter"><code><span class="type">struct udev_device</span> *udev_device</code></em>, | |
1135 | <em class="parameter"><code>const <span class="type">char</span> *sysattr</code></em>, | |
1136 | <em class="parameter"><code><span class="type">char</span> *value</code></em>);</pre> | |
1137 | <p>Update the contents of the sys attribute and the cached value of the device.</p> | |
1138 | <div class="refsect3"> | |
1139 | <a name="id-1.2.4.6.28.5"></a><h4>Parameters</h4> | |
1140 | <div class="informaltable"><table width="100%" border="0"> | |
663996b3 | 1141 | <colgroup> |
f47781d8 MP |
1142 | <col width="150px" class="parameters_name"> |
1143 | <col class="parameters_description"> | |
1144 | <col width="200px" class="parameters_annotations"> | |
663996b3 MS |
1145 | </colgroup> |
1146 | <tbody> | |
1147 | <tr> | |
f47781d8 MP |
1148 | <td class="parameter_name"><p>udev_device</p></td> |
1149 | <td class="parameter_description"><p>udev device</p></td> | |
1150 | <td class="parameter_annotations"> </td> | |
663996b3 MS |
1151 | </tr> |
1152 | <tr> | |
f47781d8 MP |
1153 | <td class="parameter_name"><p>sysattr</p></td> |
1154 | <td class="parameter_description"><p>attribute name</p></td> | |
1155 | <td class="parameter_annotations"> </td> | |
663996b3 MS |
1156 | </tr> |
1157 | <tr> | |
f47781d8 MP |
1158 | <td class="parameter_name"><p>value</p></td> |
1159 | <td class="parameter_description"><p>new value to be set</p></td> | |
1160 | <td class="parameter_annotations"> </td> | |
663996b3 MS |
1161 | </tr> |
1162 | </tbody> | |
1163 | </table></div> | |
1164 | </div> | |
f47781d8 MP |
1165 | <div class="refsect3"> |
1166 | <a name="id-1.2.4.6.28.6"></a><h4>Returns</h4> | |
1167 | <p> Negative error code on failure or 0 on success.</p> | |
1168 | <p></p> | |
1169 | </div> | |
1170 | </div> | |
663996b3 MS |
1171 | <hr> |
1172 | <div class="refsect2"> | |
f47781d8 MP |
1173 | <a name="udev-device-get-sysattr-list-entry"></a><h3>udev_device_get_sysattr_list_entry ()</h3> |
1174 | <pre class="programlisting">struct <a class="link" href="libudev-udev-list.html#udev-list-entry" title="struct udev_list_entry"><span class="returnvalue">udev_list_entry</span></a> * | |
1175 | udev_device_get_sysattr_list_entry (<em class="parameter"><code><span class="type">struct udev_device</span> *udev_device</code></em>);</pre> | |
1176 | <p>Retrieve the list of available sysattrs, with value being empty; | |
663996b3 | 1177 | This just return all available sysfs attributes for a particular |
f47781d8 MP |
1178 | device without reading their values.</p> |
1179 | <div class="refsect3"> | |
1180 | <a name="id-1.2.4.6.29.5"></a><h4>Parameters</h4> | |
1181 | <div class="informaltable"><table width="100%" border="0"> | |
663996b3 | 1182 | <colgroup> |
f47781d8 MP |
1183 | <col width="150px" class="parameters_name"> |
1184 | <col class="parameters_description"> | |
1185 | <col width="200px" class="parameters_annotations"> | |
663996b3 | 1186 | </colgroup> |
f47781d8 MP |
1187 | <tbody><tr> |
1188 | <td class="parameter_name"><p>udev_device</p></td> | |
1189 | <td class="parameter_description"><p>udev device</p></td> | |
1190 | <td class="parameter_annotations"> </td> | |
1191 | </tr></tbody> | |
663996b3 MS |
1192 | </table></div> |
1193 | </div> | |
f47781d8 MP |
1194 | <div class="refsect3"> |
1195 | <a name="id-1.2.4.6.29.6"></a><h4>Returns</h4> | |
1196 | <p> the first entry of the property list</p> | |
1197 | <p></p> | |
1198 | </div> | |
1199 | </div> | |
663996b3 MS |
1200 | <hr> |
1201 | <div class="refsect2"> | |
f47781d8 MP |
1202 | <a name="udev-device-get-seqnum"></a><h3>udev_device_get_seqnum ()</h3> |
1203 | <pre class="programlisting">unsigned long long <span class="returnvalue">int</span> | |
1204 | udev_device_get_seqnum (<em class="parameter"><code><span class="type">struct udev_device</span> *udev_device</code></em>);</pre> | |
1205 | <p>This is only valid if the device was received through a monitor. Devices read from | |
1206 | sys do not have a sequence number.</p> | |
1207 | <div class="refsect3"> | |
1208 | <a name="id-1.2.4.6.30.5"></a><h4>Parameters</h4> | |
1209 | <div class="informaltable"><table width="100%" border="0"> | |
663996b3 | 1210 | <colgroup> |
f47781d8 MP |
1211 | <col width="150px" class="parameters_name"> |
1212 | <col class="parameters_description"> | |
1213 | <col width="200px" class="parameters_annotations"> | |
663996b3 | 1214 | </colgroup> |
f47781d8 MP |
1215 | <tbody><tr> |
1216 | <td class="parameter_name"><p>udev_device</p></td> | |
1217 | <td class="parameter_description"><p>udev device</p></td> | |
1218 | <td class="parameter_annotations"> </td> | |
1219 | </tr></tbody> | |
663996b3 MS |
1220 | </table></div> |
1221 | </div> | |
f47781d8 MP |
1222 | <div class="refsect3"> |
1223 | <a name="id-1.2.4.6.30.6"></a><h4>Returns</h4> | |
1224 | <p> the kernel event sequence number, or 0 if there is no sequence number available.</p> | |
1225 | <p></p> | |
1226 | </div> | |
1227 | </div> | |
663996b3 MS |
1228 | <hr> |
1229 | <div class="refsect2"> | |
f47781d8 MP |
1230 | <a name="udev-device-get-usec-since-initialized"></a><h3>udev_device_get_usec_since_initialized ()</h3> |
1231 | <pre class="programlisting">unsigned long long <span class="returnvalue">int</span> | |
1232 | udev_device_get_usec_since_initialized | |
1233 | (<em class="parameter"><code><span class="type">struct udev_device</span> *udev_device</code></em>);</pre> | |
1234 | <p>Return the number of microseconds passed since udev set up the | |
1235 | device for the first time.</p> | |
1236 | <p>This is only implemented for devices with need to store properties | |
1237 | in the udev database. All other devices return 0 here.</p> | |
1238 | <div class="refsect3"> | |
1239 | <a name="id-1.2.4.6.31.6"></a><h4>Parameters</h4> | |
1240 | <div class="informaltable"><table width="100%" border="0"> | |
663996b3 | 1241 | <colgroup> |
f47781d8 MP |
1242 | <col width="150px" class="parameters_name"> |
1243 | <col class="parameters_description"> | |
1244 | <col width="200px" class="parameters_annotations"> | |
663996b3 | 1245 | </colgroup> |
f47781d8 MP |
1246 | <tbody><tr> |
1247 | <td class="parameter_name"><p>udev_device</p></td> | |
1248 | <td class="parameter_description"><p>udev device</p></td> | |
1249 | <td class="parameter_annotations"> </td> | |
1250 | </tr></tbody> | |
663996b3 MS |
1251 | </table></div> |
1252 | </div> | |
f47781d8 MP |
1253 | <div class="refsect3"> |
1254 | <a name="id-1.2.4.6.31.7"></a><h4>Returns</h4> | |
1255 | <p> the number of microseconds since the device was first seen.</p> | |
1256 | <p></p> | |
1257 | </div> | |
1258 | </div> | |
663996b3 MS |
1259 | <hr> |
1260 | <div class="refsect2"> | |
f47781d8 MP |
1261 | <a name="udev-device-has-tag"></a><h3>udev_device_has_tag ()</h3> |
1262 | <pre class="programlisting"><span class="returnvalue">int</span> | |
1263 | udev_device_has_tag (<em class="parameter"><code><span class="type">struct udev_device</span> *udev_device</code></em>, | |
1264 | <em class="parameter"><code>const <span class="type">char</span> *tag</code></em>);</pre> | |
1265 | <p>Check if a given device has a certain tag associated.</p> | |
1266 | <div class="refsect3"> | |
1267 | <a name="id-1.2.4.6.32.5"></a><h4>Parameters</h4> | |
1268 | <div class="informaltable"><table width="100%" border="0"> | |
663996b3 | 1269 | <colgroup> |
f47781d8 MP |
1270 | <col width="150px" class="parameters_name"> |
1271 | <col class="parameters_description"> | |
1272 | <col width="200px" class="parameters_annotations"> | |
663996b3 MS |
1273 | </colgroup> |
1274 | <tbody> | |
1275 | <tr> | |
f47781d8 MP |
1276 | <td class="parameter_name"><p>udev_device</p></td> |
1277 | <td class="parameter_description"><p>udev device</p></td> | |
1278 | <td class="parameter_annotations"> </td> | |
663996b3 MS |
1279 | </tr> |
1280 | <tr> | |
f47781d8 MP |
1281 | <td class="parameter_name"><p>tag</p></td> |
1282 | <td class="parameter_description"><p>tag name</p></td> | |
1283 | <td class="parameter_annotations"> </td> | |
663996b3 MS |
1284 | </tr> |
1285 | </tbody> | |
1286 | </table></div> | |
1287 | </div> | |
f47781d8 MP |
1288 | <div class="refsect3"> |
1289 | <a name="id-1.2.4.6.32.6"></a><h4>Returns</h4> | |
1290 | <p> 1 if the tag is found. 0 otherwise.</p> | |
1291 | <p></p> | |
1292 | </div> | |
1293 | </div> | |
1294 | </div> | |
1295 | <div class="refsect1"> | |
1296 | <a name="libudev-udev-device.other_details"></a><h2>Types and Values</h2> | |
1297 | <div class="refsect2"> | |
1298 | <a name="udev-device"></a><h3>struct udev_device</h3> | |
1299 | <pre class="programlisting">struct udev_device;</pre> | |
1300 | <p>Opaque object representing one kernel sys device.</p> | |
1301 | </div> | |
663996b3 MS |
1302 | </div> |
1303 | </div> | |
1304 | <div class="footer"> | |
1305 | <hr> | |
f47781d8 | 1306 | Generated by GTK-Doc V1.21</div> |
663996b3 MS |
1307 | </body> |
1308 | </html> |