2 * PROJECT: ReactOS FAT file system driver
3 * LICENSE: GNU GPLv3 as published by the Free Software Foundation
4 * FILE: drivers/filesystems/fastfat/device.c
5 * PURPOSE: Device control
6 * PROGRAMMERS: Aleksey Bragin (aleksey@reactos.org)
9 /* INCLUDES *****************************************************************/
14 /* FUNCTIONS ****************************************************************/
18 FatDeviceControl(PDEVICE_OBJECT DeviceObject
, PIRP Irp
)
20 DPRINT1("FatDeviceControl()\n");
21 return STATUS_NOT_IMPLEMENTED
;
25 FatPerformDevIoCtrl(PDEVICE_OBJECT DeviceObject
,
28 ULONG InputBufferSize
,
30 ULONG OutputBufferSize
,
36 PIO_STACK_LOCATION Stack
;
37 IO_STATUS_BLOCK IoStatus
;
39 /* Initialize the event for waiting */
40 KeInitializeEvent(&Event
, NotificationEvent
, FALSE
);
42 /* Build the device I/O control request */
43 Irp
= IoBuildDeviceIoControlRequest(ControlCode
,
53 /* Fail if IRP hasn't been allocated */
54 if (!Irp
) return STATUS_INSUFFICIENT_RESOURCES
;
56 /* Set verify override flag if requested */
59 Stack
= IoGetNextIrpStackLocation(Irp
);
60 Stack
->Flags
|= SL_OVERRIDE_VERIFY_VOLUME
;
64 Status
= IoCallDriver(DeviceObject
, Irp
);
67 if (Status
== STATUS_PENDING
)
69 KeWaitForSingleObject(&Event
, Executive
, KernelMode
, FALSE
, NULL
);
70 Status
= IoStatus
.Status
;