#include <ddm/ddm.h>KnError svDdmDiag(DevNode node, char * buf, int * bufSize);
The function or functions documented here may not be used safely in all application contexts with all APIs provided in the ChorusOS 5.0 product.
See API(5FEA) for details.
The svDdmDiag() call enables the DDM client to run some diagnostics on a node that is currently offline. In this way the device can be checked to see if it is suitable for service.
The svDdmAudit() call enables the DDM client to run some non-intrusive tests on an online device.
The svDdmGetStats() call returns some raw I/O statistics (counters) for an online device. These statistics are measured from the last time that the device went online.
The following three arguments are used in all three calls:
Is an opaque pointer to a manageable device. It is passed to the event handler that you specified when opening the connection to the DDM with the svDdmOpen(2K) call.
Is a pointer to the memory region allocated by the caller. Its size is specified by bufsize , and may not be NULL.
As input it specifies the size of the buffer to be filled: buf . On output it contains the size required to hold all available data. This size may be greater or less than the actual size of buf . In any case buf is only filled up to its true size.
Upon completion K_OK is returned if the state of the specified node was found. Otherwise, a negative error code is returned which indicates why the call was unsuccessful.
The specified node is not recognized as a manageable device.
The operation (diag or audit) detected a hardware error or the corresponding driver management entry point failed. A description of the problem can be found in the buf argument.
Statistics are not available for a device of this CLASS.
The driver management entry point is not supported: get_stats , diag_exec or audit (see mngt.9ddi and diag.9ddi for further details)
The device is not set in the DDM_RUNSTATE_ONLINE state.
See attributes(5) for descriptions of the following attributes:
|ATTRIBUTE TYPE||ATTRIBUTE VALUE|