]> git.ipfire.org Git - thirdparty/systemd.git/blob - man/udev_device_has_tag.xml
tree-wide: beautify remaining copyright statements
[thirdparty/systemd.git] / man / udev_device_has_tag.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_has_tag"
15 xmlns:xi="http://www.w3.org/2001/XInclude">
16
17 <refentryinfo>
18 <title>udev_device_has_tag</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_has_tag</refentrytitle>
33 <manvolnum>3</manvolnum>
34 </refmeta>
35
36 <refnamediv>
37 <refname>udev_device_has_tag</refname>
38 <refname>udev_device_get_devlinks_list_entry</refname>
39 <refname>udev_device_get_properties_list_entry</refname>
40 <refname>udev_device_get_tags_list_entry</refname>
41 <refname>udev_device_get_sysattr_list_entry</refname>
42 <refname>udev_device_get_property_value</refname>
43 <refname>udev_device_get_sysattr_value</refname>
44 <refname>udev_device_set_sysattr_value</refname>
45
46 <refpurpose>Retrieve or set device attributes</refpurpose>
47 </refnamediv>
48
49 <refsynopsisdiv>
50 <funcsynopsis>
51 <funcsynopsisinfo>#include &lt;libudev.h&gt;</funcsynopsisinfo>
52
53 <funcprototype>
54 <funcdef>struct udev_list_entry *<function>udev_device_get_devlinks_list_entry</function></funcdef>
55 <paramdef>struct udev_device *<parameter>udev_device</parameter></paramdef>
56 </funcprototype>
57
58 <funcprototype>
59 <funcdef>struct udev_list_entry *<function>udev_device_get_properties_list_entry</function></funcdef>
60 <paramdef>struct udev_device *<parameter>udev_device</parameter></paramdef>
61 </funcprototype>
62
63 <funcprototype>
64 <funcdef>struct udev_list_entry *<function>udev_device_get_tags_list_entry</function></funcdef>
65 <paramdef>struct udev_device *<parameter>udev_device</parameter></paramdef>
66 </funcprototype>
67
68 <funcprototype>
69 <funcdef>struct udev_list_entry *<function>udev_device_get_sysattr_list_entry</function></funcdef>
70 <paramdef>struct udev_device *<parameter>udev_device</parameter></paramdef>
71 </funcprototype>
72
73 <funcprototype>
74 <funcdef>const char *<function>udev_device_get_property_value</function></funcdef>
75 <paramdef>struct udev_device *<parameter>udev_device</parameter></paramdef>
76 <paramdef>const char *<parameter>key</parameter></paramdef>
77 </funcprototype>
78
79 <funcprototype>
80 <funcdef>int <function>udev_device_has_tag</function></funcdef>
81 <paramdef>struct udev_device *<parameter>udev_device</parameter></paramdef>
82 <paramdef>const char *<parameter>tag</parameter></paramdef>
83 </funcprototype>
84
85 <funcprototype>
86 <funcdef>const char *<function>udev_device_get_sysattr_value</function></funcdef>
87 <paramdef>struct udev_device *<parameter>udev_device</parameter></paramdef>
88 <paramdef>const char *<parameter>sysattr</parameter></paramdef>
89 </funcprototype>
90
91 <funcprototype>
92 <funcdef>int <function>udev_device_set_sysattr_value</function></funcdef>
93 <paramdef>struct udev_device *<parameter>udev_device</parameter></paramdef>
94 <paramdef>const char *<parameter>sysattr</parameter></paramdef>
95 <paramdef>const char *<parameter>value</parameter></paramdef>
96 </funcprototype>
97
98 </funcsynopsis>
99 </refsynopsisdiv>
100
101 <!--<refsect1>
102 <title>Description</title>
103
104 <para>XXX: Add short description.</para>
105 </refsect1>-->
106
107 <refsect1>
108 <title>Return Value</title>
109
110 <para>On success,
111 <function>udev_device_get_devlinks_list_entry()</function>,
112 <function>udev_device_get_properties_list_entry()</function>,
113 <function>udev_device_get_tags_list_entry()</function> and
114 <function>udev_device_get_sysattr_list_entry()</function> return
115 a pointer to the first entry of the retrieved list. If that list
116 is empty, or if an error occurred, <constant>NULL</constant> is
117 returned.</para>
118
119 <para>On success,
120 <function>udev_device_get_property_value()</function> and
121 <function>udev_device_get_sysattr_value()</function> return a
122 pointer to a constant string of the requested value. On error,
123 <constant>NULL</constant> is returned.</para>
124
125 <para>On success,
126 <function>udev_device_set_sysattr_value()</function> returns
127 an integer greater than, or equal to, <constant>0</constant>.
128 On failure, a negative error code is returned.</para>
129
130 <para>On success, <function>udev_device_has_tag()</function>
131 returns <constant>1</constant> or <constant>0</constant>,
132 depending on whether the device has the given tag or not.
133 On failure, a negative error code is returned.</para>
134 </refsect1>
135
136 <refsect1>
137 <title>See Also</title>
138
139 <para>
140 <citerefentry><refentrytitle>udev_new</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
141 <citerefentry><refentrytitle>udev_device_new_from_syspath</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
142 <citerefentry><refentrytitle>udev_device_get_syspath</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
143 <citerefentry><refentrytitle>udev_enumerate_new</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
144 <citerefentry><refentrytitle>udev_monitor_new_from_netlink</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
145 <citerefentry><refentrytitle>udev_list_entry</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
146 <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
147 </para>
148 </refsect1>
149
150 </refentry>