[Go to CFHT Home Page] Man Pages
Back to Software Index  BORDER=0Manpage Top Level
    device.cfinfo(4) manual page Table of Contents

Name

device.cfinfo - devconfig configuration files

Synopsis

device.cfinfo

Availability

x86

Description

device.cfinfo files pass information about device configuration to the devconfig(1M) program. They allow devconfig(1M) to provide the user with valid ranges for device attributes.

devconfig(1M) associates a device with its cfinfo file by name. For example, the device logi for the Logitec Bus Mouse has the devconfig(1M) configuration file logi.cfinfo associated with it in the DEVCONFIGHOME directory. DEVCONFIGHOME is /usr/lib/devconfig by default and may be set in the user’s environment.

Below is a yaccish grammar of a cfinfo file:

cfinfo_file:cfinfo_devspec EOF
;
cfinfo_devspec:cfinfo_spec_list SEMICOLON
;
cfinfo_spec_list:cfinfo_spec |
cfinfo_spec_list cfinfo_spec
;
cfinfo_spec:comment |
attr_value_pair NEWLINE
;
comment:POUNDSIGN |
POUNDSIGN STRING
;
attr_value_pair:ATTR_NAME EQUALS STRING |
ATTR_OWNAME EQUALS STRING
ATTR_TITLE EQUALS STRING |
ATTR_CATEGORY EQUALS STRING |
ATTR_INSTANCE EQUALS STRING |
ATTR_CLASS EQUALS STRING |
ATTR_TYPE EQUALS STRING |
ATTR_REAL EQUALS STRING |
ATTR_AUTO EQUALS STRING |
NAME EQUALS value_spec_string
;
value_spec_string:QUOTE value_spec QUOTE
;
value_spec:value_type COMMA value_list
;
value_type:| /* EMPTY */
TYPE_NUMERIC |
TYPE_STRING |
TYPE_VAR
;
value_list:integer_value_list |
string_value_list
;
integer_value_list:INTEGER |
INTEGER COLON INTEGER |
INTEGER COMMA integer_value_list
;
string_value_list:STRING |
STRING COMMA string_value_list
;
ATTR_NAMEname# device name specified in driver.conf
ATTR_CLASSclass# device class specified in driver.conf
ATTR_TYPEtype# device type specified in OWconfig
ATTR_OWNAME__owname__# device name specified in OWconfig
ATTR_TITLE__title__# device title displayed by devconfig
ATTR_CATEGORY__category__# device category
ATTR_INSTANCE__instance__# device unit
ATTR_REAL__real__# attributes to write to driver.conf
ATTR_AUTO__auto__# self-identifying device attribute
TYPE_NUMERICnumeric# precedes an integer value list
TYPE_STRINGstring# precedes a string values list
TYPE_VARvar# precedes a variable specification

The first value in a value_list is the default value picked by devconfig(1M) for the attribute. An attribute name of the form __name__ is used internally by devconfig(1M) . Number ranges are specified as n1:n2. An internal attribute of the type var specifies a configurable portion of a real attribute. (See examples below.) Certain internal attributes have an expanded form when displayed. These attributes are listed in the file abbreviations in DEVCONFIGHOME. The file abbreviations also includes a list of name mappings for certain category names. If the __real__ attribute is present, only the attribute names it specifies are written to a driver.conf file. Otherwise, all non-internal attributes are written.

Examples

Here is the device configuration file logi.cfinfo for the LOGITECH bus mouse. The driver configuration file for this device is called logi.conf.


name="logi"
    __owname__="pointer:0"
    __title__="Logitec bus mouse"
    __category__="pointer"
    class="sysbus"
    type="LOGI-B"
    buttons="var,__nbuttons__"
    __nbuttons__="numeric,2:3"
    dev="/dev/logi"
    intr="numeric,1","var,__irq__"
    __irq__="numeric,2:5"
    __real__="name","class","intr"
    ;
The driver name for the LOGITECH Bus Mouse is logi. The device name in OWconfig (see the is pointer:0. The device category is pointer; the device category is displayed as pointing devices, however, since there is a category mapping for pointer in the abbreviations file. The device class is sysbus as specified in the file /kernel/drv/classes. A device of class owin does not have a device driver associated with it. The device IPL is 1. The device IRQ is substituted by the variable __irq__ and has a range of 2 to 5. A name mapping for __irq__ exists in abbreviations and so __irq__ is displayed as Interrupt (IRQ):. The device attributes written to logi.conf are name, class, and intr as specified by the __real__" entry.

The resulting entry in logi.conf is:


name="logi" class="sysbus" intr=1,2;

The resulting entry in OWconfig is:


type="LOGI-B" buttons=3 dev="/dev/logi" class="owin" name="pointer:0";

Here is an example of a self-identifying device.


name="lp"
    __title__="Parallel printer port"
    __category__="lp"
    class="sysbus"
    __auto__="string,true"
    ;
The driver for the parallel port automatically identifies it, and devconfig(1M) treats this device as self-identifying.

Files

abbreviations

See Also

devconfig(1M) , driver.conf(4)


Table of Contents