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" >
9 SPDX-License-Identifier: LGPL-2.1+
11 This file is part of systemd.
13 Copyright 2015 David Herrmann <dh.herrmann@gmail.com>
15 systemd is free software; you can redistribute it and/or modify it
16 under the terms of the GNU Lesser General Public License as published by
17 the Free Software Foundation; either version 2.1 of the License, or
18 (at your option) any later version.
20 systemd is distributed in the hope that it will be useful, but
21 WITHOUT ANY WARRANTY; without even the implied warranty of
22 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
23 Lesser General Public License for more details.
25 You should have received a copy of the GNU Lesser General Public License
26 along with systemd; If not, see <http://www.gnu.org/licenses/>.
29 <refentry id=
"udev_device_has_tag"
30 xmlns:
xi=
"http://www.w3.org/2001/XInclude">
33 <title>udev_device_has_tag
</title>
34 <productname>systemd
</productname>
38 <contrib>Developer
</contrib>
39 <firstname>David
</firstname>
40 <surname>Herrmann
</surname>
41 <email>dh.herrmann@gmail.com
</email>
47 <refentrytitle>udev_device_has_tag
</refentrytitle>
48 <manvolnum>3</manvolnum>
52 <refname>udev_device_has_tag
</refname>
53 <refname>udev_device_get_devlinks_list_entry
</refname>
54 <refname>udev_device_get_properties_list_entry
</refname>
55 <refname>udev_device_get_tags_list_entry
</refname>
56 <refname>udev_device_get_sysattr_list_entry
</refname>
57 <refname>udev_device_get_property_value
</refname>
58 <refname>udev_device_get_sysattr_value
</refname>
59 <refname>udev_device_set_sysattr_value
</refname>
61 <refpurpose>Retrieve or set device attributes
</refpurpose>
66 <funcsynopsisinfo>#include
<libudev.h
></funcsynopsisinfo>
69 <funcdef>struct udev_list_entry *
<function>udev_device_get_devlinks_list_entry
</function></funcdef>
70 <paramdef>struct udev_device *
<parameter>udev_device
</parameter></paramdef>
74 <funcdef>struct udev_list_entry *
<function>udev_device_get_properties_list_entry
</function></funcdef>
75 <paramdef>struct udev_device *
<parameter>udev_device
</parameter></paramdef>
79 <funcdef>struct udev_list_entry *
<function>udev_device_get_tags_list_entry
</function></funcdef>
80 <paramdef>struct udev_device *
<parameter>udev_device
</parameter></paramdef>
84 <funcdef>struct udev_list_entry *
<function>udev_device_get_sysattr_list_entry
</function></funcdef>
85 <paramdef>struct udev_device *
<parameter>udev_device
</parameter></paramdef>
89 <funcdef>const char *
<function>udev_device_get_property_value
</function></funcdef>
90 <paramdef>struct udev_device *
<parameter>udev_device
</parameter></paramdef>
91 <paramdef>const char *
<parameter>key
</parameter></paramdef>
95 <funcdef>int
<function>udev_device_has_tag
</function></funcdef>
96 <paramdef>struct udev_device *
<parameter>udev_device
</parameter></paramdef>
97 <paramdef>const char *
<parameter>tag
</parameter></paramdef>
101 <funcdef>const char *
<function>udev_device_get_sysattr_value
</function></funcdef>
102 <paramdef>struct udev_device *
<parameter>udev_device
</parameter></paramdef>
103 <paramdef>const char *
<parameter>sysattr
</parameter></paramdef>
107 <funcdef>int
<function>udev_device_set_sysattr_value
</function></funcdef>
108 <paramdef>struct udev_device *
<parameter>udev_device
</parameter></paramdef>
109 <paramdef>const char *
<parameter>sysattr
</parameter></paramdef>
110 <paramdef>const char *
<parameter>value
</parameter></paramdef>
117 <title>Description</title>
119 <para>XXX: Add short description.</para>
123 <title>Return Value
</title>
126 <function>udev_device_get_devlinks_list_entry()
</function>,
127 <function>udev_device_get_properties_list_entry()
</function>,
128 <function>udev_device_get_tags_list_entry()
</function> and
129 <function>udev_device_get_sysattr_list_entry()
</function> return
130 a pointer to the first entry of the retrieved list. If that list
131 is empty, or if an error occurred,
<constant>NULL
</constant> is
135 <function>udev_device_get_property_value()
</function> and
136 <function>udev_device_get_sysattr_value()
</function> return a
137 pointer to a constant string of the requested value. On error,
138 <constant>NULL
</constant> is returned.
</para>
141 <function>udev_device_set_sysattr_value()
</function> returns
142 an integer greater than, or equal to,
<constant>0</constant>.
143 On failure, a negative error code is returned.
</para>
145 <para>On success,
<function>udev_device_has_tag()
</function>
146 returns
<constant>1</constant> or
<constant>0</constant>,
147 depending on whether the device has the given tag or not.
148 On failure, a negative error code is returned.
</para>
152 <title>See Also
</title>
155 <citerefentry><refentrytitle>udev_new
</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
156 <citerefentry><refentrytitle>udev_device_new_from_syspath
</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
157 <citerefentry><refentrytitle>udev_device_get_syspath
</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
158 <citerefentry><refentrytitle>udev_enumerate_new
</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
159 <citerefentry><refentrytitle>udev_monitor_new_from_netlink
</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
160 <citerefentry><refentrytitle>udev_list_entry
</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
161 <citerefentry><refentrytitle>systemd
</refentrytitle><manvolnum>1</manvolnum></citerefentry>,