MyWebUniversity.com Home Page
 



OpenSolaris man pages main menu


File Formats                                               fdi(4)



NAME
     fdi - HAL device information file format

SYNOPSIS
     /usr/share/lib/xml/dtd/fdi.dtd.1


DESCRIPTION
     The  hardware  abstraction  layer  facility,  described   in
     hal(5),  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 dev-
     ices.


     Each device information file has a number  of  match  direc-
     tives  that  are tested against the properties of the device
     object. The directives have the form:

       



     If all the match directives pass, then the  device  informa-
     tion  can  include  the following property directives in the
     form:

       <[mergeappendprepend] key="property" type="[stringintbool..]">



     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 dev-
     ice 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 pro-
     perty "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.storagedevice:@storage.physicaldevice:usb.vendorid"



SunOS 5.11          Last change: 5 Sept 2006                    1






File Formats                                               fdi(4)



     references the "usb.vendorid" property on the device object
     representing the USB interface.


     When the property to match has been determined, the  follow-
     ing attributes can be used within the "match" tag:

     string              Match a string  property.  For  example,
                         
                         matches only if "foo.bar"  is  a  string
                         property assuming the value "baz".


     int                 Match an integer property


     uint64              Match property with the 64-bit  unsigned
                         type


     bool                Match a boolean property


     double              Match a property of type double


     exists              Used     as     .  This  attribute  can be
                         used with "true"  and  "false",  respec-
                         tively  to  match when a property exists
                         or does not exist.


     empty               This  attribute  can  only  be  used  on
                         string   properties   with   "true"  and
                         "false". The semantics for "true" is  to
                         match only when the string is non-empty.


     isabsolutepath    Matches  only  when  a  string  property
                         represents  an  absolute  path (the path
                         does not have to exist). This  attribute
                         can  be  can  be  used  with  "true"  or
                         "false".


     isascii            Matches only when a string property con-
                         tains  ASCI  characters. This attribute
                         can be used with "true" or "false".






SunOS 5.11          Last change: 5 Sept 2006                    2






File Formats                                               fdi(4)



     comparelt          This attribute can  be  used  with  int,
                         uint64,  double and string properties to
                         compare with a constant. It matches when
                         the  given  property  is  less  than the
                         given constant using the default  order-
                         ing.


     comparele          Similar to comparelt, but matches  when
                         the given property is less than or equal
                         than  the  given  constant   using   the
                         default ordering.


     comparegt          Similar to comparelt, but matches  when
                         the  given  property is greater than the
                         given constant using the default  order-
                         ing.


                         Similar to comparelt, but matches  when
                         the  given  property  is greater than or
                         equal than the given constant using  the
                         default ordering.


                         This attribute can  only  be  used  with
                         string  and strlist (string list). For a
                         string key, this matches when  the  pro-
                         perty  contains  the  given (sub)string.
                         For a string list, this matches  if  the
                         given string matches a item in the list.


     containsncase      Similar to contains,  but  the  property
                         and  the  given  key  are  converted  to
                         lowercase before it is checked.



     The merge, append, and prepend directives  all  require  the
     attribute  type  which  specifies  what is to be merged. The
     following values are supported:

     string           The value is copied to  the  property.  For
                      example,        baz   merges   the
                      value "baz" into the property "foo.bar".


     strlist          For merge, the value is copied to the  pro-
                      perty   and   the   current   property   is



SunOS 5.11          Last change: 5 Sept 2006                    3






File Formats                                               fdi(4)



                      overwritten. For append  and  prepend,  the
                      value  is appended or prepended to the list
                      as a new item.


     bool             This attribute can merge the values  "true"
                      or "false"


     int              Merges an integer


     uint64           Merges an unsigned 64-bit integer


     double           Merges a double  precision  floating  point
                      number


     copyproperty    Copies the value of a given property;  sup-
                      ports paths with direct and indirect UDI's.
                      For    example,    @info.parent:baz.bat
                      merges the value of the property  "baz.bat"
                      on  the device object with the UDI from the
                      property "info.parent"  into  the  property
                      "foo.bar"  on  the device object being pro-
                      cessed.



     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:

       bla



     Device Information files are stored in the  following  stan-
     dard  hierachy  with  the following default top level direc-
     tories information, policy and preprobe:

     information    Device  information  files  to  merge  device
                    information.

                    10freedesktop    Device   information   files
                                     included  with  the hal tar-
                                     ball.




SunOS 5.11          Last change: 5 Sept 2006                    4






File Formats                                               fdi(4)



                    20thirdparty     Device   information   files
                                     from the device manufacturer
                                     and  installed  from   media
                                     accompanying the hardware.


                    30user           Device    information    for
                                     specific devices.



     policy         Device information files to merge policy pro-
                    pertys

                    10osvendor      Device   information    files
                                    included with the hal tarball
                                    and supplied by the operating
                                    system   vendor   for  policy
                                    rules


                    20thirdparty    Policy rules from the  device
                                    manufacturer   and  installed
                                    from media  accompanying  the
                                    hardware


                    30user          Policy  rules  for   specific
                                    devices.



     preprobe       Device information files to merge information
                    before probe devices.

                    10osvendor      Device   information    files
                                    included with the hal tarball
                                    and supplied by the operating
                                    system vendor.


                    20thirdparty    Device information files from
                                    the  device  manufacturer and
                                    installed from  media  accom-
                                    panying the hardware.


                    30user          Device    information     for
                                    specific devices.






SunOS 5.11          Last change: 5 Sept 2006                    5






File Formats                                               fdi(4)



     All device information files are matched for every hal  dev-
     ice object.

ATRIBUTES
     See attributes(5) for descriptions of the  following  attri-
     butes:



     
           ATRIBUTE TYPE               ATRIBUTE VALUE       
    
     Availability                 SUNWhalr                    
    
     Interface Stability          Volatile                    
    


SEE ALSO
     hald(1M), attributes(5), hal(5), locale(5), smf(5)



































SunOS 5.11          Last change: 5 Sept 2006                    6



OpenSolaris man pages main menu

Contact us      |       About us      |       Term of use      |       Copyright © 2000-2010 MyWebUniversity.com ™