Author: ekohl
Date: Mon Jun 1 19:22:42 2015
New Revision: 67997
URL:
http://svn.reactos.org/svn/reactos?rev=67997&view=rev
Log:
[CDFS]
Finally queue IRP_MJ_CREATE IRPs too.
Modified:
trunk/reactos/drivers/filesystems/cdfs/cdfs.c
trunk/reactos/drivers/filesystems/cdfs/cdfs.h
trunk/reactos/drivers/filesystems/cdfs/create.c
trunk/reactos/drivers/filesystems/cdfs/dispatch.c
Modified: trunk/reactos/drivers/filesystems/cdfs/cdfs.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/filesystems/cdfs/c…
==============================================================================
--- trunk/reactos/drivers/filesystems/cdfs/cdfs.c [iso-8859-1] (original)
+++ trunk/reactos/drivers/filesystems/cdfs/cdfs.c [iso-8859-1] Mon Jun 1 19:22:42 2015
@@ -81,7 +81,7 @@
DeviceObject->Flags = DO_DIRECT_IO;
DriverObject->MajorFunction[IRP_MJ_CLOSE] = CdfsFsdDispatch;
DriverObject->MajorFunction[IRP_MJ_CLEANUP] = CdfsFsdDispatch;
- DriverObject->MajorFunction[IRP_MJ_CREATE] = CdfsCreate;
+ DriverObject->MajorFunction[IRP_MJ_CREATE] = CdfsFsdDispatch;
DriverObject->MajorFunction[IRP_MJ_READ] = CdfsFsdDispatch;
DriverObject->MajorFunction[IRP_MJ_WRITE] = CdfsFsdDispatch;
DriverObject->MajorFunction[IRP_MJ_FILE_SYSTEM_CONTROL] = CdfsFsdDispatch;
Modified: trunk/reactos/drivers/filesystems/cdfs/cdfs.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/filesystems/cdfs/c…
==============================================================================
--- trunk/reactos/drivers/filesystems/cdfs/cdfs.h [iso-8859-1] (original)
+++ trunk/reactos/drivers/filesystems/cdfs/cdfs.h [iso-8859-1] Mon Jun 1 19:22:42 2015
@@ -319,12 +319,10 @@
/* create.c */
-DRIVER_DISPATCH CdfsCreate;
-
-NTSTATUS
-NTAPI
-CdfsCreate(PDEVICE_OBJECT DeviceObject,
- PIRP Irp);
+NTSTATUS
+NTAPI
+CdfsCreate(
+ PCDFS_IRP_CONTEXT IrpContext);
/* devctrl.c */
Modified: trunk/reactos/drivers/filesystems/cdfs/create.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/filesystems/cdfs/c…
==============================================================================
--- trunk/reactos/drivers/filesystems/cdfs/create.c [iso-8859-1] (original)
+++ trunk/reactos/drivers/filesystems/cdfs/create.c [iso-8859-1] Mon Jun 1 19:22:42 2015
@@ -247,26 +247,30 @@
* fail immediately
*/
Irp->IoStatus.Information = (NT_SUCCESS(Status)) ? FILE_OPENED : 0;
- Irp->IoStatus.Status = Status;
return Status;
}
NTSTATUS NTAPI
-CdfsCreate(PDEVICE_OBJECT DeviceObject,
- PIRP Irp)
-{
+CdfsCreate(
+ PCDFS_IRP_CONTEXT IrpContext)
+{
+ PDEVICE_OBJECT DeviceObject;
PDEVICE_EXTENSION DeviceExt;
NTSTATUS Status;
+ DPRINT("CdfsCreate()\n");
+
+ ASSERT(IrpContext);
+
+ DeviceObject = IrpContext->DeviceObject;
if (DeviceObject == CdfsGlobalData->DeviceObject)
{
/* DeviceObject represents FileSystem instead of logical volume */
DPRINT("Opening file system\n");
- Irp->IoStatus.Information = FILE_OPENED;
- Status = STATUS_SUCCESS;
- goto ByeBye;
+ IrpContext->Irp->IoStatus.Information = FILE_OPENED;
+ return STATUS_SUCCESS;
}
DeviceExt = DeviceObject->DeviceExtension;
@@ -275,15 +279,10 @@
ExAcquireResourceExclusiveLite(&DeviceExt->DirResource,
TRUE);
Status = CdfsCreateFile(DeviceObject,
- Irp);
+ IrpContext->Irp);
ExReleaseResourceLite(&DeviceExt->DirResource);
KeLeaveCriticalRegion();
-ByeBye:
- Irp->IoStatus.Status = Status;
- IoCompleteRequest(Irp,
- NT_SUCCESS(Status) ? IO_DISK_INCREMENT : IO_NO_INCREMENT);
-
return Status;
}
Modified: trunk/reactos/drivers/filesystems/cdfs/dispatch.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/filesystems/cdfs/d…
==============================================================================
--- trunk/reactos/drivers/filesystems/cdfs/dispatch.c [iso-8859-1] (original)
+++ trunk/reactos/drivers/filesystems/cdfs/dispatch.c [iso-8859-1] Mon Jun 1 19:22:42
2015
@@ -105,7 +105,7 @@
break;
case IRP_MJ_CREATE:
-// Status = CdfsCreate(IrpContext);
+ Status = CdfsCreate(IrpContext);
break;
case IRP_MJ_CLEANUP: