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