Handle the file query information IRP major with the dispatch routine

svn path=/trunk/; revision=67540
This commit is contained in:
Pierre Schweitzer 2015-05-03 18:36:58 +00:00
parent 7a305fc01f
commit 0a02a6e9b7
5 changed files with 16 additions and 12 deletions

View file

@ -68,6 +68,10 @@ NtfsFsdDispatch(PDEVICE_OBJECT DeviceObject,
case IRP_MJ_SET_VOLUME_INFORMATION:
Status = NtfsSetVolumeInformation(IrpContext);
break;
case IRP_MJ_QUERY_INFORMATION:
Status = NtfsQueryInformation(IrpContext);
break;
}
}
else

View file

@ -222,9 +222,7 @@ NtfsGetNetworkOpenInformation(PNTFS_FCB Fcb,
* FUNCTION: Retrieve the specified file information
*/
NTSTATUS
NTAPI
NtfsFsdQueryInformation(PDEVICE_OBJECT DeviceObject,
PIRP Irp)
NtfsQueryInformation(PNTFS_IRP_CONTEXT IrpContext)
{
FILE_INFORMATION_CLASS FileInformationClass;
PIO_STACK_LOCATION Stack;
@ -232,13 +230,17 @@ NtfsFsdQueryInformation(PDEVICE_OBJECT DeviceObject,
PNTFS_FCB Fcb;
PVOID SystemBuffer;
ULONG BufferLength;
PIRP Irp;
PDEVICE_OBJECT DeviceObject;
NTSTATUS Status = STATUS_SUCCESS;
DPRINT1("NtfsQueryInformation(%p, %p)\n", DeviceObject, Irp);
DPRINT1("NtfsQueryInformation(%p)\n", IrpContext);
Stack = IoGetCurrentIrpStackLocation(Irp);
Irp = IrpContext->Irp;
Stack = IrpContext->Stack;
DeviceObject = IrpContext->DeviceObject;
FileInformationClass = Stack->Parameters.QueryFile.FileInformationClass;
FileObject = Stack->FileObject;
FileObject = IrpContext->FileObject;
Fcb = FileObject->FsContext;
SystemBuffer = Irp->AssociatedIrp.SystemBuffer;

View file

@ -123,7 +123,7 @@ NtfsInitializeFunctionPointers(PDRIVER_OBJECT DriverObject)
DriverObject->MajorFunction[IRP_MJ_CLOSE] = NtfsFsdClose;
DriverObject->MajorFunction[IRP_MJ_READ] = NtfsFsdRead;
DriverObject->MajorFunction[IRP_MJ_WRITE] = NtfsFsdWrite;
DriverObject->MajorFunction[IRP_MJ_QUERY_INFORMATION] = NtfsFsdQueryInformation;
DriverObject->MajorFunction[IRP_MJ_QUERY_INFORMATION] = NtfsFsdDispatch;
DriverObject->MajorFunction[IRP_MJ_QUERY_VOLUME_INFORMATION] = NtfsFsdDispatch;
DriverObject->MajorFunction[IRP_MJ_SET_VOLUME_INFORMATION] = NtfsFsdDispatch;
DriverObject->MajorFunction[IRP_MJ_DIRECTORY_CONTROL] = NtfsFsdDirectoryControl;

View file

@ -642,10 +642,8 @@ NtfsReadFCBAttribute(PNTFS_VCB Vcb,
/* finfo.c */
DRIVER_DISPATCH NtfsFsdQueryInformation;
NTSTATUS NTAPI
NtfsFsdQueryInformation(PDEVICE_OBJECT DeviceObject,
PIRP Irp);
NTSTATUS
NtfsQueryInformation(PNTFS_IRP_CONTEXT IrpContext);
/* fsctl.c */

View file

@ -253,7 +253,7 @@ NtfsQueryVolumeInformation(PNTFS_IRP_CONTEXT IrpContext)
Irp = IrpContext->Irp;
DeviceObject = IrpContext->DeviceObject;
Stack = IoGetCurrentIrpStackLocation(Irp);
Stack = IrpContext->Stack;
FsInformationClass = Stack->Parameters.QueryVolume.FsInformationClass;
BufferLength = Stack->Parameters.QueryVolume.Length;
SystemBuffer = Irp->AssociatedIrp.SystemBuffer;