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 This file is part of systemd.
11 Copyright 2015 David Herrmann <dh.herrmann@gmail.com>
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.
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.
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/>.
27 <refentry id=
"udev_device_has_tag"
28 xmlns:
xi=
"http://www.w3.org/2001/XInclude">
31 <title>udev_device_has_tag
</title>
32 <productname>systemd
</productname>
36 <contrib>Developer
</contrib>
37 <firstname>David
</firstname>
38 <surname>Herrmann
</surname>
39 <email>dh.herrmann@gmail.com
</email>
45 <refentrytitle>udev_device_has_tag
</refentrytitle>
46 <manvolnum>3</manvolnum>
50 <refname>udev_device_has_tag
</refname>
51 <refname>udev_device_get_devlinks_list_entry
</refname>
52 <refname>udev_device_get_properties_list_entry
</refname>
53 <refname>udev_device_get_tags_list_entry
</refname>
54 <refname>udev_device_get_sysattr_list_entry
</refname>
55 <refname>udev_device_get_property_value
</refname>
56 <refname>udev_device_get_sysattr_value
</refname>
57 <refname>udev_device_set_sysattr_value
</refname>
59 <refpurpose>Retrieve or set device attributes
</refpurpose>
64 <funcsynopsisinfo>#include
<libudev.h
></funcsynopsisinfo>
67 <funcdef>struct udev_list_entry *
<function>udev_device_get_devlinks_list_entry
</function></funcdef>
68 <paramdef>struct udev_device *
<parameter>udev_device
</parameter></paramdef>
72 <funcdef>struct udev_list_entry *
<function>udev_device_get_properties_list_entry
</function></funcdef>
73 <paramdef>struct udev_device *
<parameter>udev_device
</parameter></paramdef>
77 <funcdef>struct udev_list_entry *
<function>udev_device_get_tags_list_entry
</function></funcdef>
78 <paramdef>struct udev_device *
<parameter>udev_device
</parameter></paramdef>
82 <funcdef>struct udev_list_entry *
<function>udev_device_get_sysattr_list_entry
</function></funcdef>
83 <paramdef>struct udev_device *
<parameter>udev_device
</parameter></paramdef>
87 <funcdef>const char *
<function>udev_device_get_property_value
</function></funcdef>
88 <paramdef>struct udev_device *
<parameter>udev_device
</parameter></paramdef>
89 <paramdef>const char *
<parameter>key
</parameter></paramdef>
93 <funcdef>int
<function>udev_device_has_tag
</function></funcdef>
94 <paramdef>struct udev_device *
<parameter>udev_device
</parameter></paramdef>
95 <paramdef>const char *
<parameter>tag
</parameter></paramdef>
99 <funcdef>const char *
<function>udev_device_get_sysattr_value
</function></funcdef>
100 <paramdef>struct udev_device *
<parameter>udev_device
</parameter></paramdef>
101 <paramdef>const char *
<parameter>sysattr
</parameter></paramdef>
105 <funcdef>int
<function>udev_device_set_sysattr_value
</function></funcdef>
106 <paramdef>struct udev_device *
<parameter>udev_device
</parameter></paramdef>
107 <paramdef>const char *
<parameter>sysattr
</parameter></paramdef>
108 <paramdef>const char *
<parameter>value
</parameter></paramdef>
115 <title>Description</title>
117 <para>XXX: Add short description.</para>
121 <title>Return Value
</title>
124 <function>udev_device_get_devlinks_list_entry()
</function>,
125 <function>udev_device_get_properties_list_entry()
</function>,
126 <function>udev_device_get_tags_list_entry()
</function> and
127 <function>udev_device_get_sysattr_list_entry()
</function> return
128 a pointer to the first entry of the retrieved list. If that list
129 is empty, or if an error occurred,
<constant>NULL
</constant> is
133 <function>udev_device_get_property_value()
</function> and
134 <function>udev_device_get_sysattr_value()
</function> return a
135 pointer to a constant string of the requested value. On error,
136 <constant>NULL
</constant> is returned.
</para>
139 <function>udev_device_set_sysattr_value()
</function> returns
140 an integer greater than, or equal to,
<constant>0</constant>.
141 On failure, a negative error code is returned.
</para>
143 <para>On success,
<function>udev_device_has_tag()
</function>
144 returns
<constant>1</constant> or
<constant>0</constant>,
145 depending on whether the device has the given tag or not.
146 On failure, a negative error code is returned.
</para>
150 <title>See Also
</title>
153 <citerefentry><refentrytitle>udev_new
</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
154 <citerefentry><refentrytitle>udev_device_new_from_syspath
</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
155 <citerefentry><refentrytitle>udev_device_get_syspath
</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
156 <citerefentry><refentrytitle>udev_enumerate_new
</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
157 <citerefentry><refentrytitle>udev_monitor_new_from_netlink
</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
158 <citerefentry><refentrytitle>udev_list_entry
</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
159 <citerefentry><refentrytitle>systemd
</refentrytitle><manvolnum>1</manvolnum></citerefentry>,