2 .\" This manual page is dervied from documentation obtained from David Zeuthen.
3 .\" Portions Copyright (c) 2006, Sun Microsystems, Inc. All Rights Reserved.
4 .\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
5 .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
6 .\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
7 .TH FDI 4 "April 9, 2016"
9 fdi \- HAL device information file format
13 /usr/share/lib/xml/dtd/fdi.dtd.1
18 The hardware abstraction layer facility, described in \fBhal\fR(5), uses an
19 \fBXML\fR-based file format to merge arbitrary properties onto device objects.
20 The way device information files works is that once all physical properties are
21 merged onto a device object, it is tried against the set of installed device
22 information files. Device information files are used for both merging facts and
23 policy settings for devices.
26 Each device information file has a number of match directives that are tested
27 against the properties of the device object. The directives have the form:
31 <match key="property" [string|int|bool|..]="value">
37 If all the match directives pass, then the device information can include the
38 following property directives in the form:
42 <[merge|append|prepend] key="property" type="[string|int|bool|..]">
48 These directives are used to merge new properties or append to existing
49 properties on the device object. Any previously property stemming from device
50 detection can be overridden by a device information file.
53 The \fBmatch\fR, \fBmerge\fR, \fBappend\fR, and \fBprepend\fR directives
54 require that the key attribute be either a property name on the device object
55 in question or a path to a property on another device object. The path to a
56 property is expressed either through direct specification of the \fBUDI\fR,
57 such as \fB/org/freedesktop/Hal/devices/computer:foo.bar\fR or through indirect
58 references such as "\fB@info.parent:baz\fR", meaning that the device object
59 specified by the \fBUDI\fR in the string property "\fBinfo.parent\fR" should be
60 used to query the property "\fBbaz\fR". It is also possible to use multiple
61 indirections. For example, for a volume on a \fBUSB\fR memory stick, the
63 "\fB@block.storage_device:@storage.physical_device:usb.vendor_id\fR" references
64 the "\fBusb.vendor_id\fR" property on the device object representing the
68 When the property to match has been determined, the following attributes can be
69 used within the "\fBmatch\fR" tag:
76 Match a string property. For example, <match key= "foo.bar" string="baz">
77 matches only if "\fBfoo.bar\fR" is a string property assuming the value
87 Match an integer property
96 Match property with the 64-bit unsigned type
105 Match a boolean property
114 Match a property of type double
123 Used as <match key="foo.bar" exists="true">. This attribute can be used with
124 "true" and "false", respectively to match when a property exists or does not
134 This attribute can only be used on string properties with "true" and "false".
135 The semantics for "true" is to match only when the string is non-empty.
141 \fB\fBis_absolute_path\fR\fR
144 Matches only when a string property represents an absolute path (the path does
145 not have to exist). This attribute can be can be used with "true" or "false".
154 Matches only when a string property contains \fBASCII\fR characters. This
155 attribute can be used with "true" or "false".
161 \fB\fBcompare_lt\fR\fR
164 This attribute can be used with \fBint\fR, \fBuint64\fR, \fBdouble\fR and
165 \fBstring\fR properties to compare with a constant. It matches when the given
166 property is less than the given constant using the default ordering.
172 \fB\fBcompare_le\fR\fR
175 Similar to \fBcompare_lt\fR, but matches when the given property is less than
176 or equal than the given constant using the default ordering.
182 \fB\fBcompare_gt\fR\fR
185 Similar to \fBcompare_lt\fR, but matches when the given property is greater
186 than the given constant using the default ordering.
195 Similar to \fBcompare_lt\fR, but matches when the given property is greater
196 than or equal than the given constant using the default ordering.
205 This attribute can only be used with \fBstring\fR and \fBstrlist\fR (string
206 list). For a string key, this matches when the property contains the given
207 (sub)string. For a string list, this matches if the given string matches a item
214 \fB\fBcontains_ncase\fR\fR
217 Similar to \fBcontains\fR, but the property and the given key are converted to
218 lowercase before it is checked.
223 The \fBmerge\fR, \fBappend\fR, and \fBprepend\fR directives all require the
224 attribute type which specifies what is to be merged. The following values are
232 The value is copied to the property. For example, <merge key="foo bar"
233 type="string"> baz</merege> merges the value "baz" into the property "foo.bar".
242 For \fBmerge\fR, the value is copied to the property and the current property
243 is overwritten. For \fBappend\fR and \fBprepend\fR, the value is appended or
244 prepended to the list as a new item.
253 This attribute can merge the values "true" or "false"
271 Merges an unsigned 64-bit integer
280 Merges a double precision floating point number
286 \fB\fBcopy_property\fR\fR
289 Copies the value of a given property; supports paths with direct and indirect
290 UDI's. For example, <merge key="foo.bar"
291 type="copy_property">@info.parent:baz.bat</merge> merges the value of the
292 property "baz.bat" on the device object with the \fBUDI\fR from the property
293 "info.parent" into the property "foo.bar" on the device object being processed.
298 The \fBremove\fR directive requires only a key and can be used with all keys.
299 For \fBstrlist\fR, there is also a special syntax to remove a item from the
300 string list. For example, to remove item "bla" from property "foo.bar", use the
305 <remove key="foo.bar" type="strlist">bla</merge>
311 Device Information files are stored in the following standard hierarchy with the
312 following default top level directories \fBinformation\fR, \fBpolicy\fR and
317 \fB\fBinformation\fR\fR
320 Device information files to merge device information.
324 \fB\fB10freedesktop\fR\fR
327 Device information files included with the \fBhal\fR tarball.
333 \fB\fB20thirdparty\fR\fR
336 Device information files from the device manufacturer and installed from media
337 accompanying the hardware.
346 Device information for specific devices.
357 Device information files to merge policy properties.
364 Device information files included with the hal tarball and supplied by the
365 operating system vendor for policy rules.
374 Policy rules from the device manufacturer and installed from media accompanying
384 Policy rules for specific devices.
395 Device information files to merge information before probe devices.
402 Device information files included with the \fBhal\fR tarball and supplied by
403 the operating system vendor.
412 Device information files from the device manufacturer and installed from media
413 accompanying the hardware.
422 Device information for specific devices.
429 All device information files are matched for every \fBhal\fR device object.
432 See \fBattributes\fR(5) for descriptions of the following attributes:
440 ATTRIBUTE TYPE ATTRIBUTE VALUE
442 Interface Stability Volatile
447 \fBhald\fR(1M), \fBattributes\fR(5), \fBhal\fR(5), \fBlocale\fR(5),