The IOCC_UNIT_STATUS CommandCode consists of all the CommandModifiers responsible for returning a unit's current status. The following table describes these CommandModifiers:
┌──────────────────────────────┬──────────────────────────────┐ │CommandModifier │Description │ ├──────────────────────────────┼──────────────────────────────┤ │IOCM_GET_UNIT_STATUS │Returns flags indicating the │ │ │unit's current Ready, Power │ │ │On, and Defective status. For│ │ │SCSI devices, if a SCSI Target│ │ │is detected, the driver must │ │ │issue a SCSI Test Unit Ready │ │ │command to obtain the current │ │ │unit status. │ ├──────────────────────────────┼──────────────────────────────┤ │IOCM_GET_CHANGELINE_STATE │Returns the unit's current │ │ │changeline state. This │ │ │command is mandatory for │ │ │standard diskette devices. │ ├──────────────────────────────┼──────────────────────────────┤ │IOCM_GET_MEDIA_SENSE │Returns the unit's current │ │ │media storage capacity. This │ │ │command is mandatory for │ │ │standard diskette devices. │ ├──────────────────────────────┼──────────────────────────────┤ │IOCM_GET_LOCK_STATUS │Returns media sense │ │ │information This command is │ │ │mandatory for standard │ │ │diskette devices. │ └──────────────────────────────┴──────────────────────────────┘
Remarks
Support:
Format of IORB
IORB_UNIT_STATUS Description
This section defines the IORB_UNIT_STATUS control block.
IORB_UNIT_STATUS
┌─────────────────┬─────────────────┬─────────┬─────────────────┐│Field Name │C-Type │Length │Description │ ├─────────────────┼─────────────────┼─────────┼─────────────────┤ │iorbh │IORBH │DB(68) │IORB header │ ├─────────────────┼─────────────────┼─────────┼─────────────────┤ │UnitStatus │USHORT │DW │Unit status │ └─────────────────┴─────────────────┴─────────┴─────────────────┘
On entry to the driver:
iorbh
See IORB General Format.
UnitStatus
equals 0, on entry. On exit from the driver, this field contains the status
information request, based on the CommandModifier field, as shown
in the following table.
┌──────────────────────────────┬──────────────────────────────┐ │CommandModifier │Description │ ├──────────────────────────────┼──────────────────────────────┤ │IOCM_GET_UNIT_STATUS │ │ │US_READY │Unit in Ready state │ │US_POWER │Unit Powered On │ │US_DEFECTIVE │Unit Defective │ ├──────────────────────────────┼──────────────────────────────┤ │IOCM_GET_CHANGELINE_STATE │ │ │US_CHANGELINE_ACTIVE │Changeline occurred │ ├──────────────────────────────┼──────────────────────────────┤ │IOCM_GET_MEDIA_SENSE │ │ │US_MEDIA_144MB │144KB media capacity │ │US_MEDIA_288MB │288KB media capacity │ │US_MEDIA_720KB │720KB media capacity │ │US_MEDIA_UNKNOWN │Media capacity unknown │ ├──────────────────────────────┼──────────────────────────────┤ │IOCM_GET_LOCK_STATUS │ │ │US_LOCKED │Unit Locked │ └──────────────────────────────┴──────────────────────────────┘
Remarks
On exit, the driver sets the Status and ErrorCode fields of the IORBH to reflect the results of the IOCC_UNIT_STATUS request.
Return Codes
For a detailed description of all the return codes, see IORB General Format.