Author: hbelusca
Date: Sun Dec 14 17:02:39 2014
New Revision: 65642
URL:
http://svn.reactos.org/svn/reactos?rev=65642&view=rev
Log:
[CONDRV]: Code reshuffling only.
Added:
branches/condrv_restructure/drivers/base/condrv/dispatch.c (with props)
Modified:
branches/condrv_restructure/drivers/base/condrv/CMakeLists.txt
branches/condrv_restructure/drivers/base/condrv/condrv.c
Modified: branches/condrv_restructure/drivers/base/condrv/CMakeLists.txt
URL:
http://svn.reactos.org/svn/reactos/branches/condrv_restructure/drivers/base…
==============================================================================
--- branches/condrv_restructure/drivers/base/condrv/CMakeLists.txt [iso-8859-1]
(original)
+++ branches/condrv_restructure/drivers/base/condrv/CMakeLists.txt [iso-8859-1] Sun Dec 14
17:02:39 2014
@@ -1,17 +1,15 @@
include_directories(${REACTOS_SOURCE_DIR}/include/reactos/drivers)
-
-## spec2def(condrv.sys condrv.spec ADD_IMPORTLIB)
list(APPEND SOURCE
condrv.c
control.c
+ dispatch.c
condrv.h)
add_library(condrv SHARED
${SOURCE}
condrv.rc)
- # ${CMAKE_CURRENT_BINARY_DIR}/condrv.def)
set_module_type(condrv kernelmodedriver)
target_link_libraries(condrv ${PSEH_LIB})
Modified: branches/condrv_restructure/drivers/base/condrv/condrv.c
URL:
http://svn.reactos.org/svn/reactos/branches/condrv_restructure/drivers/base…
==============================================================================
--- branches/condrv_restructure/drivers/base/condrv/condrv.c [iso-8859-1] (original)
+++ branches/condrv_restructure/drivers/base/condrv/condrv.c [iso-8859-1] Sun Dec 14
17:02:39 2014
@@ -29,80 +29,6 @@
DRIVER_DISPATCH ConDrvCleanup;
*/
DRIVER_DISPATCH ConDrvDispatch;
-
-NTSTATUS NTAPI
-CompleteRequest(IN PIRP Irp,
- IN NTSTATUS Status,
- IN ULONG_PTR Information)
-{
- Irp->IoStatus.Status = Status;
- Irp->IoStatus.Information = Information;
- IoCompleteRequest(Irp, IO_NO_INCREMENT);
-
- return Status;
-}
-
-NTSTATUS NTAPI
-ConDrvDispatch(IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp)
-{
-#define HANDLE_CTRL_CODE(Code) \
- case Code : \
- { \
- DPRINT1("ConDrv: " #Code ", stack->FileObject = 0x%p\n",
stack->FileObject); \
- if (stack->FileObject)
\
- {
\
- DPRINT1("stack->FileObject->FileName = %wZ\n",
&stack->FileObject->FileName); \
- }
\
- break;
\
- }
-
- PIO_STACK_LOCATION stack = IoGetCurrentIrpStackLocation(Irp);
- // ULONG ctrlCode = stack->Parameters.DeviceIoControl.IoControlCode;
- ULONG MajorFunction = stack->MajorFunction;
-
- /* Just display all the IRP codes for now... */
- switch (MajorFunction)
- {
- HANDLE_CTRL_CODE(IRP_MJ_CREATE);
- HANDLE_CTRL_CODE(IRP_MJ_CREATE_NAMED_PIPE);
- HANDLE_CTRL_CODE(IRP_MJ_CLOSE);
- HANDLE_CTRL_CODE(IRP_MJ_READ);
- HANDLE_CTRL_CODE(IRP_MJ_WRITE);
- HANDLE_CTRL_CODE(IRP_MJ_QUERY_INFORMATION);
- HANDLE_CTRL_CODE(IRP_MJ_SET_INFORMATION);
- HANDLE_CTRL_CODE(IRP_MJ_QUERY_EA);
- HANDLE_CTRL_CODE(IRP_MJ_SET_EA);
- HANDLE_CTRL_CODE(IRP_MJ_FLUSH_BUFFERS);
- HANDLE_CTRL_CODE(IRP_MJ_QUERY_VOLUME_INFORMATION);
- HANDLE_CTRL_CODE(IRP_MJ_SET_VOLUME_INFORMATION);
- HANDLE_CTRL_CODE(IRP_MJ_DIRECTORY_CONTROL);
- HANDLE_CTRL_CODE(IRP_MJ_FILE_SYSTEM_CONTROL);
- HANDLE_CTRL_CODE(IRP_MJ_DEVICE_CONTROL);
- HANDLE_CTRL_CODE(IRP_MJ_INTERNAL_DEVICE_CONTROL);
- HANDLE_CTRL_CODE(IRP_MJ_SHUTDOWN);
- HANDLE_CTRL_CODE(IRP_MJ_LOCK_CONTROL);
- HANDLE_CTRL_CODE(IRP_MJ_CLEANUP);
- HANDLE_CTRL_CODE(IRP_MJ_CREATE_MAILSLOT);
- HANDLE_CTRL_CODE(IRP_MJ_QUERY_SECURITY);
- HANDLE_CTRL_CODE(IRP_MJ_SET_SECURITY);
- HANDLE_CTRL_CODE(IRP_MJ_POWER);
- HANDLE_CTRL_CODE(IRP_MJ_SYSTEM_CONTROL);
- HANDLE_CTRL_CODE(IRP_MJ_DEVICE_CHANGE);
- HANDLE_CTRL_CODE(IRP_MJ_QUERY_QUOTA);
- HANDLE_CTRL_CODE(IRP_MJ_SET_QUOTA);
- HANDLE_CTRL_CODE(IRP_MJ_PNP);
- // case IRP_MJ_PNP_POWER:
- // case IRP_MJ_MAXIMUM_FUNCTION:
-
- default:
- {
- DPRINT1("Unknown Major %lu\n", MajorFunction);
- break;
- }
- }
-
- return CompleteRequest(Irp, STATUS_SUCCESS, 0);
-}
NTSTATUS NTAPI
DriverEntry(IN PDRIVER_OBJECT DriverObject,
@@ -168,5 +94,4 @@
return;
}
-
/* EOF */
Added: branches/condrv_restructure/drivers/base/condrv/dispatch.c
URL:
http://svn.reactos.org/svn/reactos/branches/condrv_restructure/drivers/base…
==============================================================================
--- branches/condrv_restructure/drivers/base/condrv/dispatch.c (added)
+++ branches/condrv_restructure/drivers/base/condrv/dispatch.c [iso-8859-1] Sun Dec 14
17:02:39 2014
@@ -0,0 +1,92 @@
+/*
+ * COPYRIGHT: See COPYING in the top level directory
+ * PROJECT: ReactOS Console Driver
+ * FILE: drivers/base/condrv/dispatch.c
+ * PURPOSE: Console Driver - Dispatching interface
+ * PROGRAMMERS: Hermes Belusca-Maito (hermes.belusca(a)sfr.fr)
+ */
+
+/* INCLUDES *******************************************************************/
+
+#include "condrv.h"
+
+#define NDEBUG
+#include <debug.h>
+
+/* FUNCTIONS ******************************************************************/
+
+NTSTATUS NTAPI
+CompleteRequest(IN PIRP Irp,
+ IN NTSTATUS Status,
+ IN ULONG_PTR Information)
+{
+ Irp->IoStatus.Status = Status;
+ Irp->IoStatus.Information = Information;
+ IoCompleteRequest(Irp, IO_NO_INCREMENT);
+
+ return Status;
+}
+
+NTSTATUS NTAPI
+ConDrvDispatch(IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp)
+{
+#define HANDLE_CTRL_CODE(Code) \
+ case Code : \
+ { \
+ DPRINT1("ConDrv: " #Code ", stack->FileObject = 0x%p\n",
stack->FileObject); \
+ if (stack->FileObject)
\
+ {
\
+ DPRINT1("stack->FileObject->FileName = %wZ\n",
&stack->FileObject->FileName); \
+ }
\
+ break;
\
+ }
+
+ PIO_STACK_LOCATION stack = IoGetCurrentIrpStackLocation(Irp);
+ // ULONG ctrlCode = stack->Parameters.DeviceIoControl.IoControlCode;
+ ULONG MajorFunction = stack->MajorFunction;
+
+ /* Just display all the IRP codes for now... */
+ switch (MajorFunction)
+ {
+ HANDLE_CTRL_CODE(IRP_MJ_CREATE);
+ HANDLE_CTRL_CODE(IRP_MJ_CREATE_NAMED_PIPE);
+ HANDLE_CTRL_CODE(IRP_MJ_CLOSE);
+ HANDLE_CTRL_CODE(IRP_MJ_READ);
+ HANDLE_CTRL_CODE(IRP_MJ_WRITE);
+ HANDLE_CTRL_CODE(IRP_MJ_QUERY_INFORMATION);
+ HANDLE_CTRL_CODE(IRP_MJ_SET_INFORMATION);
+ HANDLE_CTRL_CODE(IRP_MJ_QUERY_EA);
+ HANDLE_CTRL_CODE(IRP_MJ_SET_EA);
+ HANDLE_CTRL_CODE(IRP_MJ_FLUSH_BUFFERS);
+ HANDLE_CTRL_CODE(IRP_MJ_QUERY_VOLUME_INFORMATION);
+ HANDLE_CTRL_CODE(IRP_MJ_SET_VOLUME_INFORMATION);
+ HANDLE_CTRL_CODE(IRP_MJ_DIRECTORY_CONTROL);
+ HANDLE_CTRL_CODE(IRP_MJ_FILE_SYSTEM_CONTROL);
+ HANDLE_CTRL_CODE(IRP_MJ_DEVICE_CONTROL);
+ HANDLE_CTRL_CODE(IRP_MJ_INTERNAL_DEVICE_CONTROL);
+ HANDLE_CTRL_CODE(IRP_MJ_SHUTDOWN);
+ HANDLE_CTRL_CODE(IRP_MJ_LOCK_CONTROL);
+ HANDLE_CTRL_CODE(IRP_MJ_CLEANUP);
+ HANDLE_CTRL_CODE(IRP_MJ_CREATE_MAILSLOT);
+ HANDLE_CTRL_CODE(IRP_MJ_QUERY_SECURITY);
+ HANDLE_CTRL_CODE(IRP_MJ_SET_SECURITY);
+ HANDLE_CTRL_CODE(IRP_MJ_POWER);
+ HANDLE_CTRL_CODE(IRP_MJ_SYSTEM_CONTROL);
+ HANDLE_CTRL_CODE(IRP_MJ_DEVICE_CHANGE);
+ HANDLE_CTRL_CODE(IRP_MJ_QUERY_QUOTA);
+ HANDLE_CTRL_CODE(IRP_MJ_SET_QUOTA);
+ HANDLE_CTRL_CODE(IRP_MJ_PNP);
+ // case IRP_MJ_PNP_POWER:
+ // case IRP_MJ_MAXIMUM_FUNCTION:
+
+ default:
+ {
+ DPRINT1("Unknown Major %lu\n", MajorFunction);
+ break;
+ }
+ }
+
+ return CompleteRequest(Irp, STATUS_SUCCESS, 0);
+}
+
+/* EOF */
Propchange: branches/condrv_restructure/drivers/base/condrv/dispatch.c
------------------------------------------------------------------------------
svn:eol-style = native