|
cfgmgr_get_state(9r)
Contents
|
cfgmgr_get_state - General: Determines the configuration
state
int cfgmgr_get_state(
char *driver_name,
int *driver_cfg_state );
Specifies the name of the device driver whose configuration
state you want to obtain. This name is a string that
matches the string you specified for the entry_name item
in the /etc/sysconfigtab database. Typically, third-party
driver writers specify the driver name (followed by a
colon) in the sysconfigtab file fragment, which gets
appended to the /etc/sysconfigtab database during the
driver product installation. Returns one of the following
state value bits to the driver_cfg_state argument: The
specified device driver is in the dynamic configuration
state. This means the driver was dynamically configured
into the kernel. The specified device driver is in the
static configuration state. This means the driver was
statically configured into the kernel.
The cfgmgr_get_state routine obtains the configuration
state of the specified device driver. The specified device
driver is in either the static configuration state or the
dynamic configuration state.
The cfgmgr_get_state routine returns the state value in
the driver_cfg_state argument. Driver writers should store
this state value in an xx_is_dynamic variable or some similarly
named variable.
You typically call the cfgmgr_get_state routine in the
CFG_OP_CONFIGURE entry point of the device driver's configure
routine.
Upon successful completion, cfgmgr_get_state returns the
value ESUCCESS. This success value indicates that cfgmgr_get_state
returned the configuration state of the
specified device driver in the driver_cfg_state argument.
Otherwise, cfgmgr_get_state returns one of the following
error constants defined in /usr/sys/include/sys/sysconfig.h
and /usr/sys/include/sys/errno.h: The device driver
that you specified in the driver_name argument does not
exist. In this case, cfgmgr_get_state cannot return the
configuration state of the specified device driver in the
driver_cfg_state argument. The device driver that you
specified in the driver_name argument is not a valid name.
See Writing Device Drivers: Tutorial for a code example of
the cfgmgr_get_state interface.
Routines: cfgmgr_set_status(9r)
cfgmgr_get_state(9r)
[ Back ] |