TMIOSTAT (Status) tmssa Device Driver ioctl Operation

Purpose

To allow the caller to put the status information for the current or previous write operation into a structure that is defined in the /usr/include/sys/tmscsi.h file.

Description

This operation returns information about the last write operation. Because a nonblocking write operation might still be running, you must ensure that the status information applies to a particular write operation. The tm_get_stat structure in the /usr/include/sys/tmscsi.h file is used to indicate the status, as follows:

status_validity
Bit 0 set, scsi_status valid
scsi_status
SC_BUSY_STATUS Write operation in progress
SC_GOOD_STATUS Write operation completed successfully
SC_CHECK_CONDITION Write operation failed
general_card_status
Unused. Set to zero.
b_error
errno for a failed write operation, or zero.
b_resid
Updated uio_resid for the write operation.
resvd1
Unused. Set to zero.
resvd2
Unused. Set to zero.
Note: The tm_get_stat structure works only for the initiator device.