cfgmgr_set_status - General: Reports failure to the cfgmgr
char *driver_name );
Specifies the name of the device driver for which you want
to report an associated failure. This name is a string
that matches the string you specified for the entry_name
item in the /etc/sysconfigtab database. Typically, thirdparty
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.
The cfgmgr_set_status routine reports to the cfgmgr framework
that a failure has occurred during static configuration.
If the specified device driver is in the static
configuration state, it does not know that the configuration
operation is complete until all register callback
requests (routines) have successfully completed. Therefore,
a device driver calls cfgmgr_set_status to report a
possible failure during static configuration to the cfgmgr
Specifically, cfgmgr_set_status performs the following
failure operations: Adjusts the state of the specified
device driver Unconfigures the specified device driver
from the cfgmgr framework
The cfgmgr_set_status routine calls the device driver's
configure routine at its CFG_OP_UNCONFIGURE entry point as
part of these failure operations. The code associated with
the CFG_OP_UNCONFIGURE entry point is responsible for
determining how to deallocate any allocated resources during
these failure operations.
The cfgmgr_set_status routine does not notify the operator
of a configuration failure. Part of the code associated
with the CFG_OP_UNCONFIGURE entry point could include an
error logging operation to record the fact that a failure
has occurred. The reason for doing this is that the cfgmgr
framework's task is to accomplish the unconfigure operation
of a statically configured device driver.
You call the cfgmgr_set_status routine in the device
driver's callback routine when the static configuration
operation fails. You register a callback routine by calling
the register_callback routine.
Upon successful completion, cfgmgr_set_status returns the
value ESUCCESS. This success value indicates that cfgmgr_set_status
adjusted the state of the device driver and
caused the cfgmgr framework to unconfigure the driver.
Otherwise, cfgmgr_set_status 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_set_status cannot adjust the
state and unconfigure the device driver. The device
driver that you specified in the driver_name argument was
not statically configured. The device driver that you
specified in the driver_name argument is not in the static
See Writing Device Drivers: Tutorial for a code example of
the cfgmgr_set_status interface.
Routines: cfgmgr_get_state(9r), register_callback(9r)
[ Back ]