73 ULONG OutputLength =
Stack->Parameters.DeviceIoControl.OutputBufferLength;
80 TRACE_(FLOPPY,
"DeviceIoctl called\n");
82 Irp->IoStatus.Information = 0;
90 INFO_(FLOPPY,
"IOCTL_DISK_GET_MEDIA_TYPES Called\n");
94 INFO_(FLOPPY,
"IOCTL_DISK_GET_MEDIA_TYPES: insufficient buffer; returning STATUS_INVALID_PARAMETER\n");
111 INFO_(FLOPPY,
"Ioctl: completing with STATUS_SUCCESS\n");
128 INFO_(FLOPPY,
"DeviceIoctl(): completing with STATUS_VERIFY_REQUIRED\n");
130 Irp->IoStatus.Information = 0;
145 WARN_(FLOPPY,
"DeviceIoctl(): unable to sense disk change; completing with STATUS_UNSUCCESSFUL\n");
147 Irp->IoStatus.Information = 0;
155 INFO_(FLOPPY,
"DeviceIoctl(): detected disk changed; signalling media change and completing\n");
172 INFO_(FLOPPY,
"IOCTL_DISK_IS_WRITABLE Called\n");
175 Irp->IoStatus.Information = 0;
179 WARN_(FLOPPY,
"IoctlDiskIsWritable(): unable to sense drive status\n");
187 WARN_(FLOPPY,
"IoctlDiskIsWritable(): unable to read drive status result\n");
195 INFO_(FLOPPY,
"IOCTL_DISK_IS_WRITABLE: disk is write protected\n");
204 INFO_(FLOPPY,
"IOCTL_DISK_CHECK_VERIFY called\n");
205 if (OutputLength != 0)
207 if (OutputLength <
sizeof(
ULONG))
210 Irp->IoStatus.Information = 0;
216 Irp->IoStatus.Information =
sizeof(
ULONG);
222 Irp->IoStatus.Information = 0;
228 INFO_(FLOPPY,
"IOCTL_DISK_GET_DRIVE_GEOMETRY Called\n");
243 ERR_(FLOPPY,
"Format called; not supported yet\n");
245 Irp->IoStatus.Information = 0;
249 INFO_(FLOPPY,
"IOCTL_DISK_GET_PARTITION_INFO Called; not supported by a floppy driver\n");
251 Irp->IoStatus.Information = 0;
258 Irp->IoStatus.Information = 0;
262 UniqueId =
Irp->AssociatedIrp.SystemBuffer;
283 Irp->IoStatus.Information = 0;
287 Name =
Irp->AssociatedIrp.SystemBuffer;
305 ERR_(FLOPPY,
"UNKNOWN IOCTL CODE: 0x%x\n",
Code);
307 Irp->IoStatus.Information = 0;
311 INFO_(FLOPPY,
"ioctl: completing with status 0x%x\n",
Irp->IoStatus.Status);
static PIO_STACK_LOCATION IoGetCurrentIrpStackLocation(PIRP Irp)
#define IOCTL_DISK_CHECK_VERIFY
#define IOCTL_DISK_GET_DRIVE_GEOMETRY
#define IOCTL_DISK_FORMAT_TRACKS_EX
#define IOCTL_DISK_GET_MEDIA_TYPES
#define IOCTL_DISK_IS_WRITABLE
#define IOCTL_DISK_FORMAT_TRACKS
NTKERNELAPI VOID NTAPI IoCsqInsertIrp(_Inout_ PIO_CSQ Csq, _Inout_ PIRP Irp, _Out_opt_ PIO_CSQ_IRP_CONTEXT Context)
Insert an IRP into the CSQ.
NTSTATUS NTAPI HwSenseDriveStatusResult(PCONTROLLER_INFO ControllerInfo, PUCHAR Status)
NTSTATUS NTAPI HwDiskChanged(PDRIVE_INFO DriveInfo, PBOOLEAN DiskChanged)
NTSTATUS NTAPI HwSenseDriveStatus(PDRIVE_INFO DriveInfo)
#define SR3_WRITE_PROTECT_STATUS_SIGNAL
VOID NTAPI DeviceIoctlPassive(PDRIVE_INFO DriveInfo, PIRP Irp)
DRIVER_DISPATCH DeviceIoctl
NTSTATUS NTAPI ResetChangeFlag(PDRIVE_INFO DriveInfo)
VOID NTAPI SignalMediaChanged(PDEVICE_OBJECT DeviceObject, PIRP Irp)
VOID NTAPI StartMotor(PDRIVE_INFO DriveInfo)
VOID NTAPI StopMotor(PCONTROLLER_INFO ControllerInfo)
_CRTIMP size_t __cdecl wcslen(_In_z_ const wchar_t *_Str)
#define memcpy(s1, s2, n)
struct _MOUNTDEV_NAME MOUNTDEV_NAME
struct _MOUNTDEV_UNIQUE_ID MOUNTDEV_UNIQUE_ID
#define IOCTL_MOUNTDEV_QUERY_DEVICE_NAME
#define IOCTL_MOUNTDEV_QUERY_UNIQUE_ID
struct _DISK_GEOMETRY DISK_GEOMETRY
#define IOCTL_DISK_GET_PARTITION_INFO
#define IoCompleteRequest
#define STATUS_NOT_SUPPORTED
#define STATUS_NOT_IMPLEMENTED
#define STATUS_BUFFER_TOO_SMALL
#define STATUS_BUFFER_OVERFLOW
struct _CONTROLLER_INFO * ControllerInfo
PDEVICE_OBJECT DeviceObject
WCHAR DeviceNameBuffer[MAX_DEVICE_NAME]
DISK_GEOMETRY DiskGeometry
#define FIELD_OFFSET(t, f)
#define RtlCopyMemory(Destination, Source, Length)
#define STATUS_IO_DEVICE_ERROR
#define STATUS_INVALID_DEVICE_REQUEST
#define STATUS_MEDIA_WRITE_PROTECTED
#define STATUS_INVALID_PARAMETER
#define STATUS_UNSUCCESSFUL
#define STATUS_VERIFY_REQUIRED
_In_ PDEVICE_OBJECT DeviceObject
_In_ UCHAR _In_ UCHAR _In_ ULONG Code
_Must_inspect_result_ _In_ WDFIOTARGET _In_opt_ WDFREQUEST _In_opt_ PWDF_MEMORY_DESCRIPTOR OutputBuffer
_In_ WDFREQUEST _In_ PIO_STACK_LOCATION Stack
#define SL_OVERRIDE_VERIFY_VOLUME