Author: fireball
Date: Sun Dec 16 23:28:29 2007
New Revision: 31285
URL:
http://svn.reactos.org/svn/reactos?rev=31285&view=rev
Log:
- Properly allocate ArcDisk info, so it gets correctly mapped later. Fixes spontaneous
INACCESSIBLE_BOOT_DEVICE errors.
Modified:
branches/winldr/windows/peloader.c
branches/winldr/windows/winldr.c
Modified: branches/winldr/windows/peloader.c
URL:
http://svn.reactos.org/svn/reactos/branches/winldr/windows/peloader.c?rev=3…
==============================================================================
--- branches/winldr/windows/peloader.c (original)
+++ branches/winldr/windows/peloader.c Sun Dec 16 23:28:29 2007
@@ -106,8 +106,14 @@
ImportTable =
(PIMAGE_IMPORT_DESCRIPTOR)RtlImageDirectoryEntryToData(VaToPa(ScanDTE->DllBase),
TRUE, IMAGE_DIRECTORY_ENTRY_IMPORT, &ImportTableSize);
- DbgPrint((DPRINT_WINDOWS, "WinLdrScanImportDescriptorTable(): %S ImportTable =
0x%X\n",
- VaToPa(ScanDTE->BaseDllName.Buffer),ImportTable));
+ {
+ UNICODE_STRING BaseName;
+ BaseName.Buffer = VaToPa(ScanDTE->BaseDllName.Buffer);
+ BaseName.MaximumLength = ScanDTE->BaseDllName.MaximumLength;
+ BaseName.Length = ScanDTE->BaseDllName.Length;
+ DbgPrint((DPRINT_WINDOWS, "WinLdrScanImportDescriptorTable(): %wZ ImportTable =
0x%X\n",
+ &BaseName, ImportTable));
+ }
/* If image doesn't have any import directory - just return success */
if (ImportTable == NULL)
Modified: branches/winldr/windows/winldr.c
URL:
http://svn.reactos.org/svn/reactos/branches/winldr/windows/winldr.c?rev=312…
==============================================================================
--- branches/winldr/windows/winldr.c (original)
+++ branches/winldr/windows/winldr.c Sun Dec 16 23:28:29 2007
@@ -29,9 +29,6 @@
extern ARC_DISK_SIGNATURE reactos_arc_disk_info[];
extern char reactos_arc_strings[32][256];
-ARC_DISK_SIGNATURE BldrDiskInfo[32];
-CHAR BldrArcNames[32][256];
-
BOOLEAN
WinLdrCheckForLoadedDll(IN OUT PLOADER_PARAMETER_BLOCK WinLdrBlock,
IN PCH DllName,
@@ -138,7 +135,7 @@
PARC_DISK_SIGNATURE ArcDiskInfo;
/* Get the ARC structure */
- ArcDiskInfo =
(PARC_DISK_SIGNATURE)MmHeapAlloc(sizeof(ARC_DISK_SIGNATURE));//&BldrDiskInfo[i];
+ ArcDiskInfo = (PARC_DISK_SIGNATURE)MmHeapAlloc(sizeof(ARC_DISK_SIGNATURE));
RtlZeroMemory(ArcDiskInfo, sizeof(ARC_DISK_SIGNATURE));
/* Copy the data over */
@@ -146,9 +143,9 @@
ArcDiskInfo->CheckSum = reactos_arc_disk_info[i].CheckSum;
/* Copy the ARC Name */
- //ArcDiskInfo->ArcName = (PCHAR)MmAllocateMemory(sizeof(CHAR)*256);
- strcpy(BldrArcNames[i], reactos_arc_disk_info[i].ArcName);
- ArcDiskInfo->ArcName = (PCHAR)PaToVa(BldrArcNames[i]);
+ ArcDiskInfo->ArcName = (PCHAR)MmHeapAlloc(sizeof(CHAR)*256);
+ strcpy(ArcDiskInfo->ArcName, reactos_arc_disk_info[i].ArcName);
+ ArcDiskInfo->ArcName = (PCHAR)PaToVa(ArcDiskInfo->ArcName);
/* Mark partition table as valid */
ArcDiskInfo->ValidPartitionTable = TRUE;
@@ -534,7 +531,6 @@
{
MemoryDescriptor = CONTAINING_RECORD(NextMd, MEMORY_ALLOCATION_DESCRIPTOR, ListEntry);
-
DbgPrint((DPRINT_WINDOWS, "BP %08X PC %04X MT %d\n",
MemoryDescriptor->BasePage,
MemoryDescriptor->PageCount, MemoryDescriptor->MemoryType));