Puts a device and parentage into the available state.
Restores a device and parentage to their initial state before configuration.
#include <diag/diagodm.h> #include <sys/cfgodm.h> #include <sys/cfgdb.h> int configure_device ( name ) char *name; int initial_state ( state, name ) int state; char *name;
The configure_device subroutine is used to put a device into the AVAILABLE state (for testing) if the device is presently DEFINED or STOPPED. Also the parentage of the device is checked, and their states also put into AVAILABLE state if necessary.
The initial_state subroutine is used to restore the device and parentage back to their initial state (after testing).
|name||Identifies the device.|
|state||Indicates the previous state of the device.|
The following values are returned:
|DEFINED||Device was previously in the DEFINED state.|
|AVAILABLE||Device is already in the AVAILABLE state.|
|STOPPED||Device was previously in the STOPPED state.|
|-1||Error configuring the device.|