FS_GetDiskInfo(
PIOREQ pir
)
Information about a disk is obtained through FS_GetDiskInfo. This routine handles the Win32 function: GetDiskFreeSpace(); and INT 21 functions: 1Bh, 1Ch, and 36h.
GetDiskInfo Flags: | |
GDF_NO_DISK_HIT | This flag is a hint flag to the FSD. It specifies that the FSD should, if possible, return a close approximation to the freespace on the disk without accessing the disk in any fashion. This is an optimization that is used by some components in the system. It is not mandatory to implement this except in certain special cases. Look in the notes below for more details. |
ir_error | Returns status of the operation ( 0 if no error, errorcode otherwise ). |
ir_length | Returns number of bytes per sector. |
ir_size | Returns total number of allocation units. |
ir_data | Returns an optional pointer to the file allocation table (FAT) identification byte. This is only required for local FAT file systems. |
ir_sectors | Returns number of sectors per allocation unit. |
ir_numfree | Returns number of free allocation units. |
The GDF_NO_DISK_HIT flag must be supported by an FSD that is using the IOS for its operation, reports itself as a protect-mode drive, and is also servicing the paging volume. Even in this case, the FSD can return a value of -1 to indicate that it cannot provide an approximation to the disk free size. This negates the optimization. In all other cases, FSDs can safely ignore this flag and perform the normal operation to get the disk free space by hitting the disk, if necessary.