[ros-diffs] [gschneider] 44549: [ntoskrnl] - Use the PORT_MESSAGE ZeroInit and Type fields the way they are supposed to be used - Ref: http://www.reactos.org/archives/public/ros-dev/2009-December/012466.html

gschneider at svn.reactos.org gschneider at svn.reactos.org
Sat Dec 12 16:21:56 CET 2009


Author: gschneider
Date: Sat Dec 12 16:21:56 2009
New Revision: 44549

URL: http://svn.reactos.org/svn/reactos?rev=44549&view=rev
Log:
[ntoskrnl] 
- Use the PORT_MESSAGE ZeroInit and Type fields the way they are supposed to be used
- Ref: http://www.reactos.org/archives/public/ros-dev/2009-December/012466.html

Modified:
    trunk/reactos/ntoskrnl/dbgk/dbgkobj.c
    trunk/reactos/ntoskrnl/dbgk/dbgkutil.c
    trunk/reactos/ntoskrnl/ex/harderr.c
    trunk/reactos/ntoskrnl/lpc/close.c
    trunk/reactos/ntoskrnl/ps/kill.c

Modified: trunk/reactos/ntoskrnl/dbgk/dbgkobj.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/dbgk/dbgkobj.c?rev=44549&r1=44548&r2=44549&view=diff
==============================================================================
--- trunk/reactos/ntoskrnl/dbgk/dbgkobj.c [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/dbgk/dbgkobj.c [iso-8859-1] Sat Dec 12 16:21:56 2009
@@ -331,7 +331,8 @@
     /* Setup the API Message */
     ApiMessage.h.u1.Length = sizeof(DBGKM_MSG) << 16 |
                              (8 + sizeof(DBGKM_EXCEPTION));
-    ApiMessage.h.u2.ZeroInit = LPC_DEBUG_EVENT;
+    ApiMessage.h.u2.ZeroInit = 0;
+    ApiMessage.h.u2.s2.Type = LPC_DEBUG_EVENT;
     ApiMessage.ApiNumber = DbgKmExceptionApi;
 
     /* Check if this is to be sent on the debug port */
@@ -345,7 +346,8 @@
     {
         /* Otherwise, use the exception port */
         Port = Process->ExceptionPort;
-        ApiMessage.h.u2.ZeroInit = LPC_EXCEPTION;
+        ApiMessage.h.u2.ZeroInit = 0;
+        ApiMessage.h.u2.s2.Type = LPC_EXCEPTION;
         UseLpc = TRUE;
     }
 

Modified: trunk/reactos/ntoskrnl/dbgk/dbgkutil.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/dbgk/dbgkutil.c?rev=44549&r1=44548&r2=44549&view=diff
==============================================================================
--- trunk/reactos/ntoskrnl/dbgk/dbgkutil.c [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/dbgk/dbgkutil.c [iso-8859-1] Sat Dec 12 16:21:56 2009
@@ -209,7 +209,8 @@
         /* Setup the API Message */
         ApiMessage.h.u1.Length = sizeof(DBGKM_MSG) << 16 |
                                  (8 + sizeof(DBGKM_CREATE_PROCESS));
-        ApiMessage.h.u2.ZeroInit = LPC_DEBUG_EVENT;
+        ApiMessage.h.u2.ZeroInit = 0;
+        ApiMessage.h.u2.s2.Type = LPC_DEBUG_EVENT;
         ApiMessage.ApiNumber = DbgKmCreateProcessApi;
 
         /* Send the message */
@@ -269,7 +270,8 @@
             /* Setup the API Message */
             ApiMessage.h.u1.Length = sizeof(DBGKM_MSG) << 16 |
                                      (8 + sizeof(DBGKM_LOAD_DLL));
-            ApiMessage.h.u2.ZeroInit = LPC_DEBUG_EVENT;
+            ApiMessage.h.u2.ZeroInit = 0;
+            ApiMessage.h.u2.s2.Type = LPC_DEBUG_EVENT;
             ApiMessage.ApiNumber = DbgKmLoadDllApi;
 
             /* Send the message */
@@ -288,7 +290,8 @@
         /* Setup the API Message */
         ApiMessage.h.u1.Length = sizeof(DBGKM_MSG) << 16 |
                                  (8 + sizeof(DBGKM_CREATE_THREAD));
-        ApiMessage.h.u2.ZeroInit = LPC_DEBUG_EVENT;
+        ApiMessage.h.u2.ZeroInit = 0;
+        ApiMessage.h.u2.s2.Type = LPC_DEBUG_EVENT;
         ApiMessage.ApiNumber = DbgKmCreateThreadApi;
 
         /* Send the message */
@@ -321,7 +324,8 @@
     /* Setup the API Message */
     ApiMessage.h.u1.Length = sizeof(DBGKM_MSG) << 16 |
                              (8 + sizeof(DBGKM_EXIT_PROCESS));
-    ApiMessage.h.u2.ZeroInit = LPC_DEBUG_EVENT;
+    ApiMessage.h.u2.ZeroInit = 0;
+    ApiMessage.h.u2.s2.Type = LPC_DEBUG_EVENT;
     ApiMessage.ApiNumber = DbgKmExitProcessApi;
 
     /* Set the current exit time */
@@ -357,7 +361,8 @@
     /* Setup the API Message */
     ApiMessage.h.u1.Length = sizeof(DBGKM_MSG) << 16 |
                              (8 + sizeof(DBGKM_EXIT_THREAD));
-    ApiMessage.h.u2.ZeroInit = LPC_DEBUG_EVENT;
+    ApiMessage.h.u2.ZeroInit = 0;
+    ApiMessage.h.u2.s2.Type = LPC_DEBUG_EVENT;
     ApiMessage.ApiNumber = DbgKmExitThreadApi;
 
     /* Suspend the process */
@@ -414,7 +419,8 @@
     /* Setup the API Message */
     ApiMessage.h.u1.Length = sizeof(DBGKM_MSG) << 16 |
                              (8 + sizeof(DBGKM_LOAD_DLL));
-    ApiMessage.h.u2.ZeroInit = LPC_DEBUG_EVENT;
+    ApiMessage.h.u2.ZeroInit = 0;
+    ApiMessage.h.u2.s2.Type = LPC_DEBUG_EVENT;
     ApiMessage.ApiNumber = DbgKmLoadDllApi;
 
     /* Send the message */
@@ -449,7 +455,8 @@
     /* Setup the API Message */
     ApiMessage.h.u1.Length = sizeof(DBGKM_MSG) << 16 |
                              (8 + sizeof(DBGKM_UNLOAD_DLL));
-    ApiMessage.h.u2.ZeroInit = LPC_DEBUG_EVENT;
+    ApiMessage.h.u2.ZeroInit = 0;
+    ApiMessage.h.u2.s2.Type = LPC_DEBUG_EVENT;
     ApiMessage.ApiNumber = DbgKmUnloadDllApi;
 
     /* Send the message */

Modified: trunk/reactos/ntoskrnl/ex/harderr.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ex/harderr.c?rev=44549&r1=44548&r2=44549&view=diff
==============================================================================
--- trunk/reactos/ntoskrnl/ex/harderr.c [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/ex/harderr.c [iso-8859-1] Sat Dec 12 16:21:56 2009
@@ -234,7 +234,8 @@
         /* Setup the LPC Message */
         Message->h.u1.Length = (sizeof(HARDERROR_MSG) << 16) |
                                (sizeof(HARDERROR_MSG) - sizeof(PORT_MESSAGE));
-        Message->h.u2.ZeroInit = LPC_ERROR_EVENT;
+        Message->h.u2.ZeroInit = 0;
+        Message->h.u2.s2.Type = LPC_ERROR_EVENT;
         Message->Status = ErrorStatus &~ 0x10000000;
         Message->ValidResponseOptions = ValidResponseOptions;
         Message->UnicodeStringParameterMask = UnicodeStringParameterMask;

Modified: trunk/reactos/ntoskrnl/lpc/close.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/lpc/close.c?rev=44549&r1=44548&r2=44549&view=diff
==============================================================================
--- trunk/reactos/ntoskrnl/lpc/close.c [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/lpc/close.c [iso-8859-1] Sat Dec 12 16:21:56 2009
@@ -336,7 +336,8 @@
         /* Setup the client died message */
         ClientDiedMsg.h.u1.s1.TotalLength = sizeof(ClientDiedMsg);
         ClientDiedMsg.h.u1.s1.DataLength = sizeof(ClientDiedMsg.CreateTime);
-        ClientDiedMsg.h.u2.ZeroInit = LPC_PORT_CLOSED;
+        ClientDiedMsg.h.u2.ZeroInit = 0;
+        ClientDiedMsg.h.u2.s2.Type = LPC_PORT_CLOSED;
         ClientDiedMsg.CreateTime = PsGetCurrentProcess()->CreateTime;
 
         /* Send it */

Modified: trunk/reactos/ntoskrnl/ps/kill.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ps/kill.c?rev=44549&r1=44548&r2=44549&view=diff
==============================================================================
--- trunk/reactos/ntoskrnl/ps/kill.c [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/ps/kill.c [iso-8859-1] Sat Dec 12 16:21:56 2009
@@ -596,7 +596,8 @@
     if (TerminationPort)
     {
         /* Setup the message header */
-        TerminationMsg.h.u2.ZeroInit = LPC_CLIENT_DIED;
+        TerminationMsg.h.u2.ZeroInit = 0;
+        TerminationMsg.h.u2.s2.Type = LPC_CLIENT_DIED;
         TerminationMsg.h.u1.s1.TotalLength = sizeof(TerminationMsg);
         TerminationMsg.h.u1.s1.DataLength = sizeof(TerminationMsg) -
                                             sizeof(PORT_MESSAGE);




More information about the Ros-diffs mailing list