Author: pschweitzer Date: Sun May 3 18:36:58 2015 New Revision: 67540
URL: http://svn.reactos.org/svn/reactos?rev=67540&view=rev Log: [NTFS] Handle the file query information IRP major with the dispatch routine
Modified: trunk/reactos/drivers/filesystems/ntfs/dispatch.c trunk/reactos/drivers/filesystems/ntfs/finfo.c trunk/reactos/drivers/filesystems/ntfs/ntfs.c trunk/reactos/drivers/filesystems/ntfs/ntfs.h trunk/reactos/drivers/filesystems/ntfs/volinfo.c
Modified: trunk/reactos/drivers/filesystems/ntfs/dispatch.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/filesystems/ntfs/di... ============================================================================== --- trunk/reactos/drivers/filesystems/ntfs/dispatch.c [iso-8859-1] (original) +++ trunk/reactos/drivers/filesystems/ntfs/dispatch.c [iso-8859-1] Sun May 3 18:36:58 2015 @@ -68,6 +68,10 @@ case IRP_MJ_SET_VOLUME_INFORMATION: Status = NtfsSetVolumeInformation(IrpContext); break; + + case IRP_MJ_QUERY_INFORMATION: + Status = NtfsQueryInformation(IrpContext); + break; } } else
Modified: trunk/reactos/drivers/filesystems/ntfs/finfo.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/filesystems/ntfs/fi... ============================================================================== --- trunk/reactos/drivers/filesystems/ntfs/finfo.c [iso-8859-1] (original) +++ trunk/reactos/drivers/filesystems/ntfs/finfo.c [iso-8859-1] Sun May 3 18:36:58 2015 @@ -222,9 +222,7 @@ * 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 @@ PNTFS_FCB Fcb; PVOID SystemBuffer; ULONG BufferLength; + PIRP Irp; + PDEVICE_OBJECT DeviceObject; NTSTATUS Status = STATUS_SUCCESS;
- DPRINT1("NtfsQueryInformation(%p, %p)\n", DeviceObject, Irp); - - Stack = IoGetCurrentIrpStackLocation(Irp); + DPRINT1("NtfsQueryInformation(%p)\n", IrpContext); + + 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;
Modified: trunk/reactos/drivers/filesystems/ntfs/ntfs.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/filesystems/ntfs/nt... ============================================================================== --- trunk/reactos/drivers/filesystems/ntfs/ntfs.c [iso-8859-1] (original) +++ trunk/reactos/drivers/filesystems/ntfs/ntfs.c [iso-8859-1] Sun May 3 18:36:58 2015 @@ -123,7 +123,7 @@ 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;
Modified: trunk/reactos/drivers/filesystems/ntfs/ntfs.h URL: http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/filesystems/ntfs/nt... ============================================================================== --- trunk/reactos/drivers/filesystems/ntfs/ntfs.h [iso-8859-1] (original) +++ trunk/reactos/drivers/filesystems/ntfs/ntfs.h [iso-8859-1] Sun May 3 18:36:58 2015 @@ -642,10 +642,8 @@
/* finfo.c */
-DRIVER_DISPATCH NtfsFsdQueryInformation; -NTSTATUS NTAPI -NtfsFsdQueryInformation(PDEVICE_OBJECT DeviceObject, - PIRP Irp); +NTSTATUS +NtfsQueryInformation(PNTFS_IRP_CONTEXT IrpContext);
/* fsctl.c */
Modified: trunk/reactos/drivers/filesystems/ntfs/volinfo.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/filesystems/ntfs/vo... ============================================================================== --- trunk/reactos/drivers/filesystems/ntfs/volinfo.c [iso-8859-1] (original) +++ trunk/reactos/drivers/filesystems/ntfs/volinfo.c [iso-8859-1] Sun May 3 18:36:58 2015 @@ -253,7 +253,7 @@
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;