- NDK 0.98, now with versionned headers. Too many changes to list, see the TinyKRNL...
[reactos.git] / reactos / drivers / storage / diskdump / diskdump.c
index dcce7b3..cc17160 100644 (file)
 
 /* INCLUDES *****************************************************************/
 
-#include <ddk/ntddk.h>
-#include <ddk/scsi.h>
-#include <ddk/ntdddisk.h>
-#include <ddk/ntddscsi.h>
-#include <ddk/class2.h>
-#include <ntos.h>
-#include <napi/core.h>
+#include <ntddk.h>
+#include <scsi.h>
+#include <ntdddisk.h>
+#include <ntddscsi.h>
+#include <include/class2.h>
+#include <diskdump/diskdump.h>
+#include <ndk/rtlfuncs.h>
+
 #include "../scsiport/scsiport_int.h"
 
 #define NDEBUG
@@ -222,7 +223,7 @@ DiskDumpInit(VOID)
 {
   KIRQL CurrentIrql = KeGetCurrentIrql();
   IsDumping = TRUE;
-  if (CurrentIrql >= CoreDumpPortDeviceExtension->Interrupt->SynchLevel)
+  if (CurrentIrql >= CoreDumpPortDeviceExtension->Interrupt->SynchronizeIrql)
     {
       DbgPrint("DISKDUMP: Error: Crash inside high priority interrupt routine.\n");
       return(STATUS_UNSUCCESSFUL);
@@ -241,12 +242,12 @@ DiskDumpFinish(VOID)
 NTSTATUS STDCALL
 DiskDumpWrite(LARGE_INTEGER Address, PMDL Mdl)
 {
-  KIRQL OldIrql, OldIrql2;
+  KIRQL OldIrql = 0, OldIrql2 = 0;
   KIRQL CurrentIrql = KeGetCurrentIrql();
 
-  if (CurrentIrql < (CoreDumpPortDeviceExtension->Interrupt->SynchLevel - 1))
+  if (CurrentIrql < (CoreDumpPortDeviceExtension->Interrupt->SynchronizeIrql - 1))
     {
-      KeRaiseIrql(CoreDumpPortDeviceExtension->Interrupt->SynchLevel - 1, &OldIrql);
+      KeRaiseIrql(CoreDumpPortDeviceExtension->Interrupt->SynchronizeIrql - 1, &OldIrql);
     }
 
   /* Adjust the address for the start of the partition. */
@@ -260,7 +261,7 @@ DiskDumpWrite(LARGE_INTEGER Address, PMDL Mdl)
 
   /* Start i/o on the HBA. */
   IrqComplete = IrqNextRequest = FALSE;
-  KeRaiseIrql(CoreDumpPortDeviceExtension->Interrupt->SynchLevel, &OldIrql2);
+  KeRaiseIrql(CoreDumpPortDeviceExtension->Interrupt->SynchronizeIrql, &OldIrql2);
   if (!CoreDumpPortDeviceExtension->HwStartIo(&CoreDumpPortDeviceExtension->MiniPortDeviceExtension,
                                              &CoreDumpSrb))
     {
@@ -276,7 +277,7 @@ DiskDumpWrite(LARGE_INTEGER Address, PMDL Mdl)
     {
       __asm__ ("hlt\n\t");
     }
-  if (CurrentIrql < (CoreDumpPortDeviceExtension->Interrupt->SynchLevel - 1))
+  if (CurrentIrql < (CoreDumpPortDeviceExtension->Interrupt->SynchronizeIrql - 1))
     {
       KeLowerIrql(OldIrql);
     }
@@ -365,11 +366,13 @@ DiskDumpPrepare(PDEVICE_OBJECT DeviceObject, PDUMP_POINTERS DumpPointers)
            }
          else // hint-name
            {
-             Name = (PCHAR)((DWORD)DriverBase +
+             Name = (PCHAR)((ULONG)DriverBase +
                              *FunctionNameList + 2);
-             Hint = *(PWORD)((DWORD)DriverBase + *FunctionNameList);
+             Hint = *(PUSHORT)((ULONG)DriverBase + *FunctionNameList);
            }
+#if 0
          DPRINT("  Hint:%04x  Name:%s\n", Hint, pName);
+#endif
 
          for (i = 0; i < (sizeof(DiskDumpExports) / sizeof(DiskDumpExports[0])); i++)
            {