[NTVDM]
authorHermès Bélusca-Maïto <hermes.belusca-maito@reactos.org>
Wed, 22 Apr 2015 17:27:35 +0000 (17:27 +0000)
committerHermès Bélusca-Maïto <hermes.belusca-maito@reactos.org>
Wed, 22 Apr 2015 17:27:35 +0000 (17:27 +0000)
- Fix copy-paste error in the initialization of DriverHeader.
- Use BOP_... syntax for BOP #define names (to comply with the rest of the code).

svn path=/trunk/; revision=67351

reactos/subsystems/mvdm/ntvdm/dos/dos32krnl/device.c
reactos/subsystems/mvdm/ntvdm/dos/dos32krnl/himem.c

index 71152ef..91975e4 100644 (file)
@@ -375,7 +375,7 @@ PDOS_DEVICE_NODE DosCreateDeviceEx(WORD Attributes, PCHAR DeviceName, WORD Priva
     RtlMoveMemory(SEG_OFF_TO_PTR(Segment, DriverHeader->StrategyRoutine),
                   StrategyRoutine,
                   sizeof(StrategyRoutine));
-    RtlMoveMemory(SEG_OFF_TO_PTR(Segment, DriverHeader->StrategyRoutine),
+    RtlMoveMemory(SEG_OFF_TO_PTR(Segment, DriverHeader->InterruptRoutine),
                   InterruptRoutine,
                   sizeof(InterruptRoutine));
 
index 95c0571..99bbddd 100644 (file)
@@ -20,7 +20,9 @@
 #include "himem.h"
 
 #define XMS_DEVICE_NAME "XMSXXXX0"
-#define XMS_BOP 0x52
+
+/* BOP Identifiers */
+#define BOP_XMS 0x52
 
 /* PRIVATE VARIABLES **********************************************************/
 
@@ -32,7 +34,7 @@ static const BYTE EntryProcedure[] = {
     0x90, // nop
     LOBYTE(EMULATOR_BOP),
     HIBYTE(EMULATOR_BOP),
-    XMS_BOP,
+    BOP_XMS,
     0xCB // retf
 };
 
@@ -264,7 +266,7 @@ VOID XmsInitialize(VOID)
                              XMS_DEVICE_NAME,
                              sizeof(EntryProcedure));
 
-    RegisterBop(XMS_BOP, XmsBopProcedure);
+    RegisterBop(BOP_XMS, XmsBopProcedure);
 
     /* Copy the entry routine to the device private area */
     RtlMoveMemory(FAR_POINTER(DEVICE_PRIVATE_AREA(Node->Driver)),
@@ -274,6 +276,6 @@ VOID XmsInitialize(VOID)
 
 VOID XmsCleanup(VOID)
 {
-    RegisterBop(XMS_BOP, NULL);
+    RegisterBop(BOP_XMS, NULL);
     DosDeleteDevice(Node);
 }