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 e.g. 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.