Author: pschweitzer
Date: Mon May 11 21:11:48 2015
New Revision: 67670
URL:
http://svn.reactos.org/svn/reactos?rev=67670&view=rev
Log:
[NTFS]
Handle IRP_MJ_DEVICE_CONTROL with the dispatch routine
Modified:
trunk/reactos/drivers/filesystems/ntfs/devctl.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/devctl.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/filesystems/ntfs/d…
==============================================================================
--- trunk/reactos/drivers/filesystems/ntfs/devctl.c [iso-8859-1] (original)
+++ trunk/reactos/drivers/filesystems/ntfs/devctl.c [iso-8859-1] Mon May 11 21:11:48 2015
@@ -33,14 +33,16 @@
/* FUNCTIONS ****************************************************************/
NTSTATUS
-NTAPI
-NtfsFsdDeviceControl(PDEVICE_OBJECT DeviceObject,
- PIRP Irp)
+NtfsDeviceControl(PNTFS_IRP_CONTEXT IrpContext)
{
PDEVICE_EXTENSION DeviceExt;
+ PIRP Irp = IrpContext->Irp;
- DeviceExt = DeviceObject->DeviceExtension;
+ DeviceExt = IrpContext->DeviceObject->DeviceExtension;
IoSkipCurrentIrpStackLocation(Irp);
+
+ /* Lower driver will complete - we don't have to */
+ IrpContext->Flags &= ~IRPCONTEXT_COMPLETE;
return IoCallDriver(DeviceExt->StorageDevice, Irp);
}
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] Mon May 11 21:11:48
2015
@@ -80,6 +80,10 @@
case IRP_MJ_READ:
Status = NtfsRead(IrpContext);
break;
+
+ case IRP_MJ_DEVICE_CONTROL:
+ Status = NtfsDeviceControl(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] Mon May 11 21:11:48 2015
@@ -128,7 +128,7 @@
DriverObject->MajorFunction[IRP_MJ_SET_VOLUME_INFORMATION] = NtfsFsdDispatch;
DriverObject->MajorFunction[IRP_MJ_DIRECTORY_CONTROL] = NtfsFsdDispatch;
DriverObject->MajorFunction[IRP_MJ_FILE_SYSTEM_CONTROL] =
NtfsFsdFileSystemControl;
- DriverObject->MajorFunction[IRP_MJ_DEVICE_CONTROL] =
NtfsFsdDeviceControl;
+ DriverObject->MajorFunction[IRP_MJ_DEVICE_CONTROL] = NtfsFsdDispatch;
return;
}
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] Mon May 11 21:11:48 2015
@@ -536,10 +536,8 @@
/* devctl.c */
-DRIVER_DISPATCH NtfsFsdDeviceControl;
-NTSTATUS NTAPI
-NtfsFsdDeviceControl(PDEVICE_OBJECT DeviceObject,
- PIRP Irp);
+NTSTATUS
+NtfsDeviceControl(PNTFS_IRP_CONTEXT IrpContext);
/* dirctl.c */