[CDFS]
authorEric Kohl <eric.kohl@reactos.org>
Mon, 1 Jun 2015 15:04:50 +0000 (15:04 +0000)
committerEric Kohl <eric.kohl@reactos.org>
Mon, 1 Jun 2015 15:04:50 +0000 (15:04 +0000)
Queue IRP_MJ_DIRECTORY_CONTROL IRPs.

svn path=/trunk/; revision=67991

reactos/drivers/filesystems/cdfs/cdfs.c
reactos/drivers/filesystems/cdfs/cdfs.h
reactos/drivers/filesystems/cdfs/dirctl.c
reactos/drivers/filesystems/cdfs/dispatch.c

index 14a3607..2a420c9 100644 (file)
@@ -85,8 +85,7 @@ DriverEntry(PDRIVER_OBJECT DriverObject,
     DriverObject->MajorFunction[IRP_MJ_READ] = CdfsRead;
     DriverObject->MajorFunction[IRP_MJ_WRITE] = CdfsWrite;
     DriverObject->MajorFunction[IRP_MJ_FILE_SYSTEM_CONTROL] = CdfsFsdDispatch;
-    DriverObject->MajorFunction[IRP_MJ_DIRECTORY_CONTROL] =
-        CdfsDirectoryControl;
+    DriverObject->MajorFunction[IRP_MJ_DIRECTORY_CONTROL] = CdfsFsdDispatch;
     DriverObject->MajorFunction[IRP_MJ_QUERY_INFORMATION] = CdfsFsdDispatch;
     DriverObject->MajorFunction[IRP_MJ_SET_INFORMATION] = CdfsFsdDispatch;
     DriverObject->MajorFunction[IRP_MJ_QUERY_VOLUME_INFORMATION] = CdfsFsdDispatch;
index 29e9ef6..aede6db 100644 (file)
@@ -338,12 +338,10 @@ CdfsDeviceControl(
 
 /* dirctl.c */
 
-DRIVER_DISPATCH CdfsDirectoryControl;
-
 NTSTATUS
 NTAPI
-CdfsDirectoryControl(PDEVICE_OBJECT DeviceObject,
-                     PIRP Irp);
+CdfsDirectoryControl(
+    PCDFS_IRP_CONTEXT IrpContext);
 
 /* dispatch.c */
 
@@ -452,13 +450,9 @@ CdfsSetInformation(
 
 /* fsctl.c */
 
-//DRIVER_DISPATCH CdfsFileSystemControl;
-
 NTSTATUS NTAPI
 CdfsFileSystemControl(
     PCDFS_IRP_CONTEXT IrpContext);
-//    PDEVICE_OBJECT DeviceObject,
-//                      PIRP Irp);
 
 
 /* misc.c */
index f40fbc5..1ec1a22 100644 (file)
@@ -784,18 +784,23 @@ CdfsNotifyChangeDirectory(PDEVICE_OBJECT DeviceObject,
 
 
 NTSTATUS NTAPI
-CdfsDirectoryControl(PDEVICE_OBJECT DeviceObject,
-                     PIRP Irp)
+CdfsDirectoryControl(
+    PCDFS_IRP_CONTEXT IrpContext)
 {
-    PIO_STACK_LOCATION Stack;
+    PIRP Irp;
+    PDEVICE_OBJECT DeviceObject;
     NTSTATUS Status;
 
     DPRINT("CdfsDirectoryControl() called\n");
-    FsRtlEnterFileSystem();
 
-    Stack = IoGetCurrentIrpStackLocation(Irp);
+    ASSERT(IrpContext);
+
+    Irp = IrpContext->Irp;
+    DeviceObject = IrpContext->DeviceObject;
+
+    FsRtlEnterFileSystem();
 
-    switch (Stack->MinorFunction)
+    switch (IrpContext->MinorFunction)
     {
     case IRP_MN_QUERY_DIRECTORY:
         Status = CdfsQueryDirectory(DeviceObject,
@@ -808,7 +813,7 @@ CdfsDirectoryControl(PDEVICE_OBJECT DeviceObject,
         break;
 
     default:
-        DPRINT1("CDFS: MinorFunction %u\n", Stack->MinorFunction);
+        DPRINT1("CDFS: MinorFunction %u\n", IrpContext->MinorFunction);
         Status = STATUS_INVALID_DEVICE_REQUEST;
         break;
     }
@@ -817,7 +822,6 @@ CdfsDirectoryControl(PDEVICE_OBJECT DeviceObject,
     {
         Irp->IoStatus.Status = Status;
         Irp->IoStatus.Information = 0;
-        IoCompleteRequest(Irp, IO_NO_INCREMENT);
     }
     FsRtlExitFileSystem();
 
index 8a7ddcb..1d1951b 100644 (file)
@@ -18,7 +18,7 @@
  *
  * COPYRIGHT:        See COPYING in the top level directory
  * PROJECT:          ReactOS kernel
- * FILE:             drivers/filesystem/cdfs/dispatch.c
+ * FILE:             drivers/filesystems/cdfs/dispatch.c
  * PURPOSE:          CDROM (ISO 9660) filesystem driver
  * PROGRAMMER:       Pierre Schweitzer
  */
@@ -85,7 +85,7 @@ CdfsDispatch(PCDFS_IRP_CONTEXT IrpContext)
             break;
 
         case IRP_MJ_DIRECTORY_CONTROL:
-//            Status = CdfsDirectoryControl(IrpContext);
+            Status = CdfsDirectoryControl(IrpContext);
             break;
 
         case IRP_MJ_READ: