Author: pschweitzer
Date: Sun May 10 10:17:29 2015
New Revision: 67615
URL:
http://svn.reactos.org/svn/reactos?rev=67615&view=rev
Log:
[NTFS]
Handle IRP_MJ_DIRECTORY_CONTROL with the dispatch routine
Modified:
trunk/reactos/drivers/filesystems/ntfs/dirctl.c
trunk/reactos/drivers/filesystems/ntfs/dispatch.c
trunk/reactos/drivers/filesystems/ntfs/ntfs.c
trunk/reactos/drivers/filesystems/ntfs/ntfs.h
Modified: trunk/reactos/drivers/filesystems/ntfs/dirctl.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/filesystems/ntfs/d…
==============================================================================
--- trunk/reactos/drivers/filesystems/ntfs/dirctl.c [iso-8859-1] (original)
+++ trunk/reactos/drivers/filesystems/ntfs/dirctl.c [iso-8859-1] Sun May 10 10:17:29 2015
@@ -436,52 +436,30 @@
NTSTATUS
-NTAPI
-NtfsFsdDirectoryControl(PDEVICE_OBJECT DeviceObject,
- PIRP Irp)
-{
- PNTFS_IRP_CONTEXT IrpContext = NULL;
+NtfsDirectoryControl(PNTFS_IRP_CONTEXT IrpContext)
+{
NTSTATUS Status = STATUS_UNSUCCESSFUL;
DPRINT1("NtfsDirectoryControl() called\n");
- FsRtlEnterFileSystem();
- ASSERT(DeviceObject);
- ASSERT(Irp);
-
- NtfsIsIrpTopLevel(Irp);
-
- IrpContext = NtfsAllocateIrpContext(DeviceObject, Irp);
- if (IrpContext)
- {
- switch (IrpContext->MinorFunction)
- {
- case IRP_MN_QUERY_DIRECTORY:
- Status = NtfsQueryDirectory(IrpContext);
- break;
-
- case IRP_MN_NOTIFY_CHANGE_DIRECTORY:
- DPRINT1("IRP_MN_NOTIFY_CHANGE_DIRECTORY\n");
- Status = STATUS_NOT_IMPLEMENTED;
- break;
-
- default:
- Status = STATUS_INVALID_DEVICE_REQUEST;
- break;
- }
- }
- else
- Status = STATUS_INSUFFICIENT_RESOURCES;
-
- Irp->IoStatus.Status = Status;
- Irp->IoStatus.Information = 0;
- IoCompleteRequest(Irp, IO_NO_INCREMENT);
-
- if (IrpContext)
- ExFreePoolWithTag(IrpContext, 'PRIN');
-
- IoSetTopLevelIrp(NULL);
- FsRtlExitFileSystem();
+ switch (IrpContext->MinorFunction)
+ {
+ case IRP_MN_QUERY_DIRECTORY:
+ Status = NtfsQueryDirectory(IrpContext);
+ break;
+
+ case IRP_MN_NOTIFY_CHANGE_DIRECTORY:
+ DPRINT1("IRP_MN_NOTIFY_CHANGE_DIRECTORY\n");
+ Status = STATUS_NOT_IMPLEMENTED;
+ break;
+
+ default:
+ Status = STATUS_INVALID_DEVICE_REQUEST;
+ break;
+ }
+
+ IrpContext->Irp->IoStatus.Information = 0;
+
return Status;
}
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 10:17:29
2015
@@ -72,6 +72,10 @@
case IRP_MJ_QUERY_INFORMATION:
Status = NtfsQueryInformation(IrpContext);
break;
+
+ case IRP_MJ_DIRECTORY_CONTROL:
+ Status = NtfsDirectoryControl(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 10:17:29 2015
@@ -126,7 +126,7 @@
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;
+ DriverObject->MajorFunction[IRP_MJ_DIRECTORY_CONTROL] = NtfsFsdDispatch;
DriverObject->MajorFunction[IRP_MJ_FILE_SYSTEM_CONTROL] =
NtfsFsdFileSystemControl;
DriverObject->MajorFunction[IRP_MJ_DEVICE_CONTROL] =
NtfsFsdDeviceControl;
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 10:17:29 2015
@@ -541,10 +541,8 @@
/* dirctl.c */
-DRIVER_DISPATCH NtfsFsdDirectoryControl;
-NTSTATUS NTAPI
-NtfsFsdDirectoryControl(PDEVICE_OBJECT DeviceObject,
- PIRP Irp);
+NTSTATUS
+NtfsDirectoryControl(PNTFS_IRP_CONTEXT IrpContext);
/* dispatch.c */