This commit is contained in:
Bill Zissimopoulos
2015-11-21 21:25:19 -08:00
parent 14b1f75ac7
commit d6f1702af7
15 changed files with 458 additions and 28 deletions

View File

@ -6,12 +6,49 @@
#include <sys/driver.h>
static DRIVER_DISPATCH FspFsctlClose;
static DRIVER_DISPATCH FspFsvrtClose;
static DRIVER_DISPATCH FspFsvolClose;
DRIVER_DISPATCH FspClose;
#ifdef ALLOC_PRAGMA
#pragma alloc_text(PAGE, FspFsctlClose)
#pragma alloc_text(PAGE, FspFsvrtClose)
#pragma alloc_text(PAGE, FspFsvolClose)
#pragma alloc_text(PAGE, FspClose)
#endif
static
NTSTATUS
FspFsctlClose(
_In_ PDEVICE_OBJECT DeviceObject,
_In_ PIRP Irp)
{
NTSTATUS Result = STATUS_SUCCESS;
Irp->IoStatus.Information = 0;
return Result;
}
static
NTSTATUS
FspFsvrtClose(
_In_ PDEVICE_OBJECT DeviceObject,
_In_ PIRP Irp)
{
NTSTATUS Result = STATUS_SUCCESS;
Irp->IoStatus.Information = 0;
return Result;
}
static
NTSTATUS
FspFsvolClose(
_In_ PDEVICE_OBJECT DeviceObject,
_In_ PIRP Irp)
{
return STATUS_INVALID_DEVICE_REQUEST;
}
NTSTATUS
FspClose(
_In_ PDEVICE_OBJECT DeviceObject,
@ -21,10 +58,17 @@ FspClose(
ASSERT(IRP_MJ_CLOSE == IrpSp->MajorFunction);
if (FspFsctlDeviceExtensionKind == FspDeviceExtension(DeviceObject)->Kind)
FSP_RETURN(Irp->IoStatus.Information = 0);
Result = STATUS_INVALID_DEVICE_REQUEST;
switch (FspDeviceExtension(DeviceObject)->Kind)
{
case FspFsvolDeviceExtensionKind:
FSP_RETURN(Result = FspFsvolClose(DeviceObject, Irp));
case FspFsvrtDeviceExtensionKind:
FSP_RETURN(Result = FspFsvrtClose(DeviceObject, Irp));
case FspFsctlDeviceExtensionKind:
FSP_RETURN(Result = FspFsctlClose(DeviceObject, Irp));
default:
FSP_RETURN(Result = STATUS_INVALID_DEVICE_REQUEST);
}
FSP_LEAVE_MJ("FileObject=%p", IrpSp->FileObject);
}