[ Bottom of Page | Previous Page | Next Page | Contents | Index | Library Home | Legal | Search ]

Understanding the Diagnostic Subsystem for AIX

pdiag_restore_state

Purpose

Restores resource and children to their initial state before testing.

Syntax

#include    <sys/pdiag_def.h>
 
int32  pdiag_restore_state ( char *device_instance )

Description

The pdiag_restore_state subroutine puts the device, and its children if necessary, back to the original state before the pdiag_diagnose_state routine was called.

This function is platform-implementation specific. Its main purpose is to make sure that the target device is back in its original state prior to performing diagnostics on the device, and that the Enhanced Error Handling (EEH) option is disabled. If the device is already in the correct state, then this function should return a successful status value of zero. If an error occurs, then this function should return a non-zero value.

Parameters

Parameter Description
device_instance Name of the device under test.

Return Value

The pdiag_restore_state subroutine returns one of the following values:

Return Value Description
0 Successful return.
-1 Software error.
1 Error restoring device to initial state.
-2 EEH hardware error.

Related Information

The pdiag_diagnose_state, pdiag_diagnose_multifunc_state, and pdiag_restore_multifunc_state subroutines.

pdiag_restore_multifunc_state

Purpose

Restores a device and its children to their initial state before testing.

Syntax

#include <sys/pdiag_def.h>
int32 pdiag_restore_multifunc_state (char *device_instance, int eeh_activate)

Description

The pdiag_restore_multifunc_state subroutine puts the device, and its children if necessary, back to the original state before the pdiag_diagnose_multifunc_state routine was called.

This function is platform-implementation specific. Its main purpose is to make sure that the target device is back in its original state before diagnostic functions were performed on the device and the Enhanced Error handling (EEH) option is returned to the state originally encountered. If the device is already in the correct state, this function should return a successful status. If an error occurs, this function should return a non-zero.

Parameters

Parameter Description
device_instance Name of device under test.
eeh_activate
0
Do not disable the EEH option
1
Disable the EEH option

Return Value

The pdiag_restore_multifunc_state function returns one of the following values:

Return Value Description
0 Successful return
-1 Software error
1 Error putting device in diagnose state
-2 Hardware error

Related Information

The pdiag_restore_state, pdiag_diagnose_state, and pdiag_diagnose_multifunc_state subroutines.

[ Top of Page | Previous Page | Next Page | Contents | Index | Library Home | Legal | Search ]