FS_Ioctl16Drive

FS_Ioctl16Drive(
 PIOREQ pir
 )
 

All IOCtl operations are performed through FS_Ioctl16Drive. This routine handles int 21h function 44h.

ir_rh
Supplies the volume handle for the disk resource.
ir_flags
Supplies the IOCtl sub-function. The sub-function numbers are the same as the IOCtl sub-functions defined in DOS.
ir_options
Supplies special options for the IOCtl operation.
IOCtl Options:  
Value Meaning
IOCTL_PKT_LINEAR_ADDRESS This flag specifies that the IOCtl parameter packet's address should not be picked up from the client registers, which is the default. In this case, the linear address of the packet is passed in ir_data. Any pointers in the packet have been resolved to be normal V86 addresses.

ir_cregptr
Supplies a pointer to the client register structure. The FSD picks up all its parameters directly from the client registers. The only exception is when the IOCTL_PKT_LINEAR_ADDRESS option is specified.
ir_data
Supplies the linear address of the IOCtl packet if the IOCTL_PKT_LINEAR_ADDRESS flag is specified.
ir_user
Supplies user ID for this request.
ir_pid
Supplies process ID for this request.
ir_error Returns status of the operation ( 0 if no error, errorcode otherwise ).
ir_cregptr Returns the appropriate register values for the corresponding IOCtl.

In most cases, the FSD would just pass this request down to the driver. For some requests, it might want to look at the requests, so that it can flush its cache for instance. There are some IOCtl requests that the FSD might have to process on its own, for example, Get/Set Media Id. Except for some cases, the IFS manager usually does not translate any of the pointers that are passed in the registers. It is the responsibility of the FSD or the driver that handles the IOCtl request to perform all pointer translations.