Author: pschweitzer
Date: Sun May 10 20:35:40 2015
New Revision: 67634
URL:
http://svn.reactos.org/svn/reactos?rev=67634&view=rev
Log:
[NTFS]
Handle IRP_MJ_READ with the dispatch routine
Modified:
trunk/reactos/drivers/filesystems/ntfs/dispatch.c
trunk/reactos/drivers/filesystems/ntfs/ntfs.c
trunk/reactos/drivers/filesystems/ntfs/ntfs.h
trunk/reactos/drivers/filesystems/ntfs/rw.c
Modified: trunk/reactos/drivers/filesystems/ntfs/dispatch.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/filesystems/ntfs/d…
==============================================================================
--- trunk/reactos/drivers/filesystems/ntfs/dispatch.c [iso-8859-1] (original)
+++ trunk/reactos/drivers/filesystems/ntfs/dispatch.c [iso-8859-1] Sun May 10 20:35:40
2015
@@ -76,6 +76,10 @@
case IRP_MJ_DIRECTORY_CONTROL:
Status = NtfsDirectoryControl(IrpContext);
break;
+
+ case IRP_MJ_READ:
+ Status = NtfsRead(IrpContext);
+ break;
}
}
else
Modified: trunk/reactos/drivers/filesystems/ntfs/ntfs.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/filesystems/ntfs/n…
==============================================================================
--- trunk/reactos/drivers/filesystems/ntfs/ntfs.c [iso-8859-1] (original)
+++ trunk/reactos/drivers/filesystems/ntfs/ntfs.c [iso-8859-1] Sun May 10 20:35:40 2015
@@ -121,7 +121,7 @@
{
DriverObject->MajorFunction[IRP_MJ_CREATE] = NtfsFsdCreate;
DriverObject->MajorFunction[IRP_MJ_CLOSE] = NtfsFsdClose;
- DriverObject->MajorFunction[IRP_MJ_READ] = NtfsFsdRead;
+ DriverObject->MajorFunction[IRP_MJ_READ] = NtfsFsdDispatch;
DriverObject->MajorFunction[IRP_MJ_WRITE] = NtfsFsdWrite;
DriverObject->MajorFunction[IRP_MJ_QUERY_INFORMATION] = NtfsFsdDispatch;
DriverObject->MajorFunction[IRP_MJ_QUERY_VOLUME_INFORMATION] = NtfsFsdDispatch;
Modified: trunk/reactos/drivers/filesystems/ntfs/ntfs.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/filesystems/ntfs/n…
==============================================================================
--- trunk/reactos/drivers/filesystems/ntfs/ntfs.h [iso-8859-1] (original)
+++ trunk/reactos/drivers/filesystems/ntfs/ntfs.h [iso-8859-1] Sun May 10 20:35:40 2015
@@ -759,10 +759,8 @@
/* rw.c */
-DRIVER_DISPATCH NtfsFsdRead;
-NTSTATUS NTAPI
-NtfsFsdRead(PDEVICE_OBJECT DeviceObject,
- PIRP Irp);
+NTSTATUS
+NtfsRead(PNTFS_IRP_CONTEXT IrpContext);
DRIVER_DISPATCH NtfsFsdWrite;
NTSTATUS NTAPI
Modified: trunk/reactos/drivers/filesystems/ntfs/rw.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/filesystems/ntfs/r…
==============================================================================
--- trunk/reactos/drivers/filesystems/ntfs/rw.c [iso-8859-1] (original)
+++ trunk/reactos/drivers/filesystems/ntfs/rw.c [iso-8859-1] Sun May 10 20:35:40 2015
@@ -161,9 +161,7 @@
NTSTATUS
-NTAPI
-NtfsFsdRead(PDEVICE_OBJECT DeviceObject,
- PIRP Irp)
+NtfsRead(PNTFS_IRP_CONTEXT IrpContext)
{
PDEVICE_EXTENSION DeviceExt;
PIO_STACK_LOCATION Stack;
@@ -173,13 +171,17 @@
LARGE_INTEGER ReadOffset;
ULONG ReturnedReadLength = 0;
NTSTATUS Status = STATUS_SUCCESS;
-
- DPRINT("NtfsRead(DeviceObject %x, Irp %x)\n",DeviceObject,Irp);
+ PIRP Irp;
+ PDEVICE_OBJECT DeviceObject;
+
+ DPRINT("NtfsRead(DeviceObject %p)\n", IrpContext);
+
+ DeviceObject = IrpContext->DeviceObject;
+ Irp = IrpContext->Irp;
+ Stack = IrpContext->Stack;
+ FileObject = IrpContext->FileObject;
DeviceExt = DeviceObject->DeviceExtension;
- Stack = IoGetCurrentIrpStackLocation(Irp);
- FileObject = Stack->FileObject;
-
ReadLength = Stack->Parameters.Read.Length;
ReadOffset = Stack->Parameters.Read.ByteOffset;
Buffer = MmGetSystemAddressForMdl(Irp->MdlAddress);
@@ -206,9 +208,6 @@
Irp->IoStatus.Information = 0;
}
- Irp->IoStatus.Status = Status;
- IoCompleteRequest(Irp,IO_NO_INCREMENT);
-
return Status;
}