|
cfg_subsys_attr_t(9s)
Contents
|
cfg_subsys_attr_t - General: Contains attribute information
for kernel modules
typedef struct {
char name[CFG_ATTR_NAME_SZ];
uchar type;
uchar operation;
caddr_t addr;
ulong min_val;
ulong max_val;
ulong val_size; } cfg_subsys_attr_t;
Specifies the ASCII name of the attribute. The name must
be between 2 and CFG_ATTR_NAME_SZ characters in length,
including the terminating null character. Do not begin the
ASCII name of the attribute with the Method_ or Device_
characters. The cfgmgr framework reserves certain names
that begin with the Method_ and Device_ characters. Specifies
the data type associated with the name attribute.
See the DESCRIPTION section for the constants you can pass
to the type member. Specifies the operations that the
cfgmgr framework can perform on the attribute. See the
DESCRIPTION section for the constants you can pass to the
operation member. Specifies the address of the data value
associated with the attribute. The cfgmgr framework
obtains the data value for this attribute from the
/etc/sysconfigtab database and stores it at this address.
The cfgmgr framework performs this storage operation if
the following occurs: The attribute appears in the
cfg_subsys_attr_t table (declared and initialized in the
kernel module) with an operation code of CFG_OP_CONFIGURE.
The kernel module writer passes the CFG_OP_CONFIGURE constant
to the optype argument of the kernel module's configure
routine. This is the kernel module's configuration
entry point for handling static or dynamic configuration
requests.
Although the configure routine can initialize
attributes that appear in the array with an operation
code of CFG_OP_CONFIGURE, the cfgmgr framework
overrides this initialization with the value specified
in the /etc/sysconfigtab database. Specifies
the minimum length of a string data value. If the
data type for the attribute is numeric, specifies
the minimum range. Specifies the maximum length of
a string data value. If the data type for the
attribute is numeric, specifies the maximum range.
Specifies the binary data size.
The cfg_subsys_attr_t data structure contains information
that kernel modules use to describe a variety of
attributes. Kernel module writers declare and initialize
an array of cfg_subsys_attr_t data structures in their
kernel modules. The cfg_subsys_attr_t data structure is a
simplified version of the cfg_attr_t data structure and is
designed to save space in the kernel.
You must set the type member to one of the following constants:
Data type is a null-terminated array of characters.
Data type is a 32-bit signed integer. Data type is
a 32-bit unsigned integer. Data type is a 64-bit signed
integer. Data type is a 64-bit unsigned integer. Data
type is an array of bytes. Data type is an 8-bit unsigned
character. Data type is a 16-bit unsigned short integer.
You can set the operation member to one of the following
constants: The cfgmgr framework configures the attribute.
This means the cfgmgr framework obtains a data value for
the attribute from the /etc/sysconfigtab database. The
configure operation occurs when the cfgmgr framework calls
the kernel module's configure routine at its CFG_OP_CONFIGURE
entry point. (That is, the optype argument of theconfigure
routine evaluates to the CFG_OP_CONFIGURE constant.)
The cfgmgr framework queries (reads) the
attribute. This means the kernel module cooperates with
the cfgmgr framework to provide the value associated with
the attribute as a result of user-initiated query
requests. These requests are typically the result of the
sysconfig -q command. The query operation occurs when the
cfgmgr framework calls the kernel module's configure routine
at its CFG_OP_QUERY entry point. (That is, the optype
argument of the configure routine evaluates to the
CFG_OP_QUERY constant.) The cfgmgr framework reconfigures
the attribute. This means the cfgmgr framework reconfigures
the data value for the attribute. This functionality
allows a user to modify the attribute. A reconfigure
request is typically the result of the sysconfig -r command.
The reconfigure operation occurs when the cfgmgr
framework calls the kernel module's configure routine at
its CFG_OP_RECONFIGURE entry point. (That is, the optype
argument of the configure routine evaluates to the
CFG_OP_RECONFIGURE constant.)
SEE ALSO
Data Structures: cfg_attr_t(9s)
cfg_subsys_attr_t(9s)
[ Back ] |