FDI(5) | File Formats and Configurations | FDI(5) |
fdi - HAL device information file format
/usr/share/lib/xml/dtd/fdi.dtd.1
The hardware abstraction layer facility, described in hal(7), uses an XML-based file format to merge arbitrary properties onto device objects. The way device information files works is that once all physical properties are merged onto a device object, it is tried against the set of installed device information files. Device information files are used for both merging facts and policy settings for devices.
Each device information file has a number of match directives that are tested against the properties of the device object. The directives have the form:
<match key="property" [string|int|bool|..]="value">
If all the match directives pass, then the device information can include the following property directives in the form:
<[merge|append|prepend] key="property" type="[string|int|bool|..]">
These directives are used to merge new properties or append to existing properties on the device object. Any previously property stemming from device detection can be overridden by a device information file.
The match, merge, append, and prepend directives require that the key attribute be either a property name on the device object in question or a path to a property on another device object. The path to a property is expressed either through direct specification of the UDI, such as /org/freedesktop/Hal/devices/computer:foo.bar or through indirect references such as "@info.parent:baz", meaning that the device object specified by the UDI in the string property "info.parent" should be used to query the property "baz". It is also possible to use multiple indirections. For example, for a volume on a USB memory stick, the indirection "@block.storage_device:@storage.physical_device:usb.vendor_id" references the "usb.vendor_id" property on the device object representing the USB interface.
When the property to match has been determined, the following attributes can be used within the "match" tag:
string
int
uint64
bool
double
exists
empty
is_absolute_path
is_ascii
compare_lt
compare_le
compare_gt
contains_ncase
The merge, append, and prepend directives all require the attribute type which specifies what is to be merged. The following values are supported:
string
strlist
bool
int
uint64
double
copy_property
The remove directive requires only a key and can be used with all keys. For strlist, there is also a special syntax to remove a item from the string list. For example, to remove item "bla" from property "foo.bar", use the following syntax:
<remove key="foo.bar" type="strlist">bla</merge>
Device Information files are stored in the following standard hierarchy with the following default top level directories information, policy and preprobe:
information
10freedesktop
20thirdparty
30user
policy
10osvendor
20thirdparty
30user
preprobe
10osvendor
20thirdparty
30user
All device information files are matched for every hal device object.
See attributes(7) for descriptions of the following attributes:
ATTRIBUTE TYPE | ATTRIBUTE VALUE |
Interface Stability | Volatile |
April 9, 2016 | OmniOS |