The IOCC_GEOMETRY CommandCode consists of all the CommandModifiers responsible for setting and returning information about the capacity of a unit.
The CommandModifiers are described in the following table:
ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿ ³CommandModifier ³Description ³ ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´ ³IOCM_GET_MEDIA_GEOMETRY ³Returns the geometry of the ³ ³ ³current media in a drive. ³ ³ ³For non-removable media ³ ³ ³devices, the geometry returned³ ³ ³must be identical to the ³ ³ ³geometry returned by ³ ³ ³IOCM_GET_DEVICE_GEOMETRY. ³ ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´ ³IOCM_SET_MEDIA_GEOMETRY ³Informs the adapter device ³ ³ ³driver of the required media ³ ³ ³geometry in preparation for ³ ³ ³formatting. This command is ³ ³ ³mandatory only for standard ³ ³ ³diskette media. ³ ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´ ³IOCM_GET_DEVICE_GEOMETRY ³Returns the device geometry ³ ³ ³compatible with INT 13h BIOS ³ ³ ³function 08h. ³ ³ ³If the INT 13h support for a ³ ³ ³device provides translation, ³ ³ ³the INT 13h geometry of the ³ ³ ³device must be returned with ³ ³ ³the BIOS translation performed³ ³ ³within the driver. That is, ³ ³ ³the driver must emulate any ³ ³ ³INT 13h translation performed ³ ³ ³by BIOS. ³ ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´ ³IOCM_SET_LOGICAL_GEOMETRY ³Indicates that the geometry ³ ³ ³recorded in the file system ³ ³ ³tables on the media does not ³ ³ ³match the physical media ³ ³ ³geometry reported by the ³ ³ ³device driver. ³ ³ ³The driver should convert RBA ³ ³ ³to CHS addresses according to ³ ³ ³the geometry passed in this ³ ³ ³IORB, rather than using the ³ ³ ³media geometry the driver is ³ ³ ³reporting. The device driver ³ ³ ³should stop performing this ³ ³ ³translation if a media change ³ ³ ³indication is detected. ³ ³ ³Support of this command is ³ ³ ³mandatory only for standard ³ ³ ³diskette media. ³ ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ
Remarks
Support:
Format of IORB
IOCC_GEOMETRY Description
This section defines the IORB_GEOMETRY and GEOMETRY control blocks. (See the table below.)
ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿³Field Name ³C Type ³Length ³Description ³ ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´ ³iorbh ³IORBH ³DB(68) ³IORB header ³ ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´ ³pGeometry ³PGEOMETRY ³DD ³Pointer to ³ ³ ³ ³ ³GEOMETRY ³ ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´ ³GeometryLen ³USHORT ³DW ³Length of ³ ³ ³ ³ ³GEOMETRY data ³ ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ
On entry to the driver:
iorbh
See IORB General Format.
pGeometry
contains a far pointer to the block of storage (length = GeometryLen)
allocated by the caller for the GEOMETRY.
GeometryLen
contains the size of the block of storage, in bytes, for the GEOMETRY structure
(pGeometry).
GEOMETRY Description
ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿ ³Field Name ³C Type ³Length ³Description ³ ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´ ³TotalSectors ³ULONG ³DD ³Number of sectors³ ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´ ³BytesPerSector ³USHORT ³DW ³Bytes per sector ³ ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´ ³Reserved ³USHORT ³DW ³Reserved ³ ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´ ³NumHeads ³USHORT ³DW ³Number of heads ³ ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´ ³TotalCylinders ³ULONG ³DD ³Number of ³ ³ ³ ³ ³cylinders ³ ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´ ³SectorsPerTrack ³USHORT ³DW ³Number of sectors³ ³ ³ ³ ³per track ³ ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ
On entry to the driver for SET CommandModifiers, and on exit from the driver for GET CommandModifiers, the following apply:
TotalSectors
contains the total number of sectors.
BytesPerSector
contains the number of bytes per sector. The IBM OS/2 2.0 File System supports
only a value of 512.
Reserved
contains a 0. This alignment field ensures that the GEOMETRY structure
aligns with SCSI Read Capacity output.
NumHeads
contains the number of heads.
TotalCylinders
contains the number of cylinders.
SectorsPerTrack
contains the number of sectors per track.
Note: SCSI devices normally do not support cylinder/head/sector (CHS) addressing. However, to maintain INT 13h BIOS compatibility, most controllers create CHS mapping for the devices they support. For non-boot devices, which do not provide INT 13h support, NumHeads, TotalCylinders, and SectorsPerTrack can be set to 0, and the device manager will select appropriate CHS values.
On exit, the driver sets the Status and ErrorCode fields of the IORBH to reflect the results of the IOCC_GEOMETRY request.
Return Codes
Following is a list of the IOCC_GEOMETRY error codes:
IOERR_CMD_NOT_SUPPORTED
IOERR_CMD_SYNTAX
IOERR_CMD_SW_RESOURCE
IOERR_UNIT_NOT_ALLOCATED
IOERR_UNIT_NOT_READY
IOERR_UNIT_PWR_OFF
IOERR_MEDIA_NOT_FORMATTED
IOERR_MEDIA_NOT_SUPPORTED
IOERR_MEDIA_CHANGED
IOERR_MEDIA_NOT_PRESENT
IOERR_ADAPTER_HOSTBUSCHECK
IOERR_ADAPTER_DEVICEBUSCHECK
IOERR_ADAPTER_OVERRUN
IOERR_ADAPTER_UNDERRUN
IOERR_ADAPTER_DIAGFAIL
IOERR_ADAPTER_TIMEOUT
IOERR_ADAPTER_DEVICE_TIMEOUT
IOERR_ADAPTER_REQ_NOT_SUPPORTED
IOERR_ADAPTER_REFER_TO_STATUS
IOERR_DEVICE_DEVICEBUSCHECK
IOERR_DEVICE_REQ_NOT_SUPPORTED
IOERR_DEVICE_DIAGFAIL
IOERR_DEVICE_BUSY
IOERR_DEVICE_OVERRUN
IOERR_DEVICE_UNDERRUN
For a detailed description of all the return codes, see Error Handling.