2 .\" Copyright (c) 2010 The DragonFly Project. All rights reserved.
4 .\" Redistribution and use in source and binary forms, with or without
5 .\" modification, are permitted provided that the following conditions
8 .\" 1. Redistributions of source code must retain the above copyright
9 .\" notice, this list of conditions and the following disclaimer.
10 .\" 2. Redistributions in binary form must reproduce the above copyright
11 .\" notice, this list of conditions and the following disclaimer in
12 .\" the documentation and/or other materials provided with the
14 .\" 3. Neither the name of The DragonFly Project nor the names of its
15 .\" contributors may be used to endorse or promote products derived
16 .\" from this software without specific, prior written permission.
18 .\" THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19 .\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
20 .\" LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
21 .\" FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
22 .\" COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
23 .\" INCIDENTAL, SPECIAL, EXEMPLARY OR CONSEQUENTIAL DAMAGES (INCLUDING,
24 .\" BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
25 .\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
26 .\" AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
27 .\" OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
28 .\" OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
36 .Nm udev_device_unref ,
37 .Nm udev_device_get_dictionary ,
38 .Nm udev_device_get_udev ,
39 .Nm udev_device_get_action ,
40 .Nm udev_device_get_devnum ,
41 .Nm udev_device_get_devnode ,
42 .Nm udev_device_get_driver ,
43 .Nm udev_device_get_subsystem ,
44 .Nm udev_device_get_kptr ,
45 .Nm udev_device_get_major ,
46 .Nm udev_device_get_minor ,
47 .Nm udev_device_get_property_value
48 .Nd udev device functions
53 .Ft struct udev_device *
54 .Fn udev_device_ref "struct udev_device *udev_device"
56 .Fn udev_device_unref "struct udev_device *udev_device"
58 .Fn udev_device_get_udev "struct udev_device *udev_device"
60 .Fn udev_device_get_dictionary "struct udev_device *udev_device"
62 .Fn udev_device_get_action "struct udev_device *udev_device"
64 .Fn udev_device_get_devnum "struct udev_device *udev_device"
66 .Fn udev_device_get_devnode "struct udev_device *udev_device"
68 .Fn udev_device_get_driver "struct udev_device *udev_device"
70 .Fn udev_device_get_subsystem "struct udev_device *udev_device"
72 .Fn udev_device_get_kptr "struct udev_device *udev_device"
74 .Fn udev_device_get_major "struct udev_device *udev_device"
76 .Fn udev_device_get_minor "struct udev_device *udev_device"
78 .Fn udev_device_get_property_value "struct udev_device *udev_device" "const char *key"
84 functions increase or decrease the reference count on a
87 When the reference count drops to 0, the object is automatically destroyed.
90 function returns the same object that was passed in.
93 .Fn udev_device_get_udev
94 function returns the udev context in which the
99 .Fn udev_device_get_dictionary
100 function returns the raw
101 .Xr prop_dictionary 3
102 dictionary associated to the given
106 when no dictionary is associated to the device.
109 .Fn udev_device_get_action
110 function returns the action, as a string, related to the
112 Possible actions are "add" for attach events, "remove" for detach events and
113 "none" if the udev_device is not associated with a particular event.
116 .Fn udev_device_get_devnum ,
117 .Fn udev_device_get_devnode ,
118 .Fn udev_device_get_driver ,
119 .Fn udev_device_get_subsystem ,
120 .Fn udev_device_get_kptr ,
121 .Fn udev_device_get_major
123 .Fn udev_device_get_minor
124 function return some information of the device corresponding to the
127 .Fn udev_device_get_devnum ,
128 function returns the device number.
130 .Fn udev_device_get_devnode
131 function returns the full path in the system to the given device.
132 The returned string and errno are the same as for the
136 .Fn udev_device_get_driver
138 .Fn udev_device_get_subsystem
139 functions return the driver name and subsystem of the device if available.
140 Otherwise they return
143 .Fn udev_device_get_kptr ,
144 .Fn udev_device_get_major
146 .Fn udev_device_get_minor
147 functions return the kernel pointer to the associated cdev_t, the major and the
148 minor number, respectively.
151 .Fn udev_device_get_property_value
152 function returns the value for the
154 for the specified property
165 .Xr udev_enumerate 3 ,