Handle IRP_MJ_FILE_SYSTEM_CONTROL with the dispatch routine

svn path=/trunk/; revision=67905
This commit is contained in:
Pierre Schweitzer 2015-05-25 12:55:51 +00:00
parent 6971703339
commit 8f4f1ce119
4 changed files with 14 additions and 17 deletions

View file

@ -104,6 +104,10 @@ NtfsDispatch(PNTFS_IRP_CONTEXT IrpContext)
case IRP_MJ_CREATE:
Status = NtfsCreate(IrpContext);
break;
case IRP_MJ_FILE_SYSTEM_CONTROL:
Status = NtfsFileSystemControl(IrpContext);
break;
}
ASSERT((!(IrpContext->Flags & IRPCONTEXT_COMPLETE) && !(IrpContext->Flags & IRPCONTEXT_QUEUE)) ||

View file

@ -866,20 +866,19 @@ NtfsUserFsRequest(PDEVICE_OBJECT DeviceObject,
NTSTATUS
NTAPI
NtfsFsdFileSystemControl(PDEVICE_OBJECT DeviceObject,
PIRP Irp)
NtfsFileSystemControl(PNTFS_IRP_CONTEXT IrpContext)
{
PIO_STACK_LOCATION Stack;
NTSTATUS Status;
PIRP Irp;
PDEVICE_OBJECT DeviceObject;
DPRINT1("NtfsFileSystemControl() called\n");
Stack = IoGetCurrentIrpStackLocation(Irp);
DeviceObject = IrpContext->DeviceObject;
Irp = IrpContext->Irp;
Irp->IoStatus.Information = 0;
switch (Stack->MinorFunction)
switch (IrpContext->MinorFunction)
{
case IRP_MN_KERNEL_CALL:
DPRINT1("NTFS: IRP_MN_USER_FS_REQUEST\n");
@ -901,15 +900,11 @@ NtfsFsdFileSystemControl(PDEVICE_OBJECT DeviceObject,
break;
default:
DPRINT1("NTFS FSC: MinorFunction %d\n", Stack->MinorFunction);
DPRINT1("NTFS FSC: MinorFunction %d\n", IrpContext->MinorFunction);
Status = STATUS_INVALID_DEVICE_REQUEST;
break;
}
Irp->IoStatus.Status = Status;
IoCompleteRequest(Irp, IO_NO_INCREMENT);
return Status;
}

View file

@ -131,7 +131,7 @@ NtfsInitializeFunctionPointers(PDRIVER_OBJECT DriverObject)
DriverObject->MajorFunction[IRP_MJ_QUERY_VOLUME_INFORMATION] = NtfsFsdDispatch;
DriverObject->MajorFunction[IRP_MJ_SET_VOLUME_INFORMATION] = NtfsFsdDispatch;
DriverObject->MajorFunction[IRP_MJ_DIRECTORY_CONTROL] = NtfsFsdDispatch;
DriverObject->MajorFunction[IRP_MJ_FILE_SYSTEM_CONTROL] = NtfsFsdFileSystemControl;
DriverObject->MajorFunction[IRP_MJ_FILE_SYSTEM_CONTROL] = NtfsFsdDispatch;
DriverObject->MajorFunction[IRP_MJ_DEVICE_CONTROL] = NtfsFsdDispatch;
return;

View file

@ -644,10 +644,8 @@ NtfsQueryInformation(PNTFS_IRP_CONTEXT IrpContext);
/* fsctl.c */
DRIVER_DISPATCH NtfsFsdFileSystemControl;
NTSTATUS NTAPI
NtfsFsdFileSystemControl(PDEVICE_OBJECT DeviceObject,
PIRP Irp);
NTSTATUS
NtfsFileSystemControl(PNTFS_IRP_CONTEXT IrpContext);
/* mft.c */