[NTFS]
authorPierre Schweitzer <pierre@reactos.org>
Sun, 24 May 2015 12:17:43 +0000 (12:17 +0000)
committerPierre Schweitzer <pierre@reactos.org>
Sun, 24 May 2015 12:17:43 +0000 (12:17 +0000)
Handle IRP_MJ_WRITE with the dispatch routine

svn path=/trunk/; revision=67876

reactos/drivers/filesystems/ntfs/dispatch.c
reactos/drivers/filesystems/ntfs/ntfs.c
reactos/drivers/filesystems/ntfs/ntfs.h
reactos/drivers/filesystems/ntfs/rw.c

index ef90599..4a28fb0 100644 (file)
@@ -71,6 +71,10 @@ NtfsDispatch(PNTFS_IRP_CONTEXT IrpContext)
         case IRP_MJ_DEVICE_CONTROL:
             Status = NtfsDeviceControl(IrpContext);
              break;
+
+        case IRP_MJ_WRITE:
+            Status = NtfsWrite(IrpContext);
+            break;
     }
 
     ASSERT((!(IrpContext->Flags & IRPCONTEXT_COMPLETE) && !(IrpContext->Flags & IRPCONTEXT_QUEUE)) ||
index 70cf828..5ba10c8 100644 (file)
@@ -122,7 +122,7 @@ NtfsInitializeFunctionPointers(PDRIVER_OBJECT DriverObject)
     DriverObject->MajorFunction[IRP_MJ_CREATE]                   = NtfsFsdCreate;
     DriverObject->MajorFunction[IRP_MJ_CLOSE]                    = NtfsFsdClose;
     DriverObject->MajorFunction[IRP_MJ_READ]                     = NtfsFsdDispatch;
-    DriverObject->MajorFunction[IRP_MJ_WRITE]                    = NtfsFsdWrite;
+    DriverObject->MajorFunction[IRP_MJ_WRITE]                    = NtfsFsdDispatch;
     DriverObject->MajorFunction[IRP_MJ_QUERY_INFORMATION]        = NtfsFsdDispatch;
     DriverObject->MajorFunction[IRP_MJ_QUERY_VOLUME_INFORMATION] = NtfsFsdDispatch;
     DriverObject->MajorFunction[IRP_MJ_SET_VOLUME_INFORMATION]   = NtfsFsdDispatch;
index a31f6c2..e9f2ee5 100644 (file)
@@ -762,10 +762,8 @@ NtfsFileFlagsToAttributes(ULONG NtfsAttributes,
 NTSTATUS
 NtfsRead(PNTFS_IRP_CONTEXT IrpContext);
 
-DRIVER_DISPATCH NtfsFsdWrite;
-NTSTATUS NTAPI
-NtfsFsdWrite(PDEVICE_OBJECT DeviceObject,
-             PIRP Irp);
+NTSTATUS
+NtfsWrite(PNTFS_IRP_CONTEXT IrpContext);
 
 
 /* volinfo.c */
index 1c7e0d0..fa7aeb0 100644 (file)
@@ -186,7 +186,7 @@ NtfsRead(PNTFS_IRP_CONTEXT IrpContext)
     PIRP Irp;
     PDEVICE_OBJECT DeviceObject;
 
-    DPRINT("NtfsRead(DeviceObject %p)\n", IrpContext);
+    DPRINT("NtfsRead(IrpContext %p)\n", IrpContext);
 
     DeviceObject = IrpContext->DeviceObject;
     Irp = IrpContext->Irp;
@@ -225,14 +225,11 @@ NtfsRead(PNTFS_IRP_CONTEXT IrpContext)
 
 
 NTSTATUS
-NTAPI
-NtfsFsdWrite(PDEVICE_OBJECT DeviceObject,
-             PIRP Irp)
+NtfsWrite(PNTFS_IRP_CONTEXT IrpContext)
 {
-    DPRINT("NtfwWrite(DeviceObject %x Irp %x)\n",DeviceObject,Irp);
+    DPRINT("NtfsWrite(IrpContext %p)\n",IrpContext);
 
-    Irp->IoStatus.Status = STATUS_NOT_SUPPORTED;
-    Irp->IoStatus.Information = 0;
+    IrpContext->Irp->IoStatus.Information = 0;
     return STATUS_NOT_SUPPORTED;
 }