mirror of
https://github.com/reactos/reactos.git
synced 2024-08-24 20:28:57 +00:00
[FREELDR]
Fix CDs checksum computation [NTOSKRNL] Fix ARC names accordingly svn path=/trunk/; revision=49040
This commit is contained in:
parent
40dba5e526
commit
5686788c8b
|
@ -1004,6 +1004,7 @@ DetectBiosDisks(PCONFIGURATION_COMPONENT_DATA BusKey)
|
||||||
|
|
||||||
/* Calculate the MBR checksum */
|
/* Calculate the MBR checksum */
|
||||||
for (i = 0; i < 2048 / sizeof(ULONG); i++) Checksum += Buffer[i];
|
for (i = 0; i < 2048 / sizeof(ULONG); i++) Checksum += Buffer[i];
|
||||||
|
Checksum = ~Checksum + 1;
|
||||||
DPRINTM(DPRINT_HWDETECT, "Checksum: %x\n", Checksum);
|
DPRINTM(DPRINT_HWDETECT, "Checksum: %x\n", Checksum);
|
||||||
|
|
||||||
/* Fill out the ARC disk block */
|
/* Fill out the ARC disk block */
|
||||||
|
|
|
@ -368,7 +368,7 @@ IopAssignArcNamesToCdrom(IN PLOADER_PARAMETER_BLOCK LoaderBlock,
|
||||||
ARC_DISK_SIGNATURE,
|
ARC_DISK_SIGNATURE,
|
||||||
ListEntry);
|
ListEntry);
|
||||||
/* And check if checksums and arc names match */
|
/* And check if checksums and arc names match */
|
||||||
if (CheckSum == ArcDiskEntry->CheckSum &&
|
if (CheckSum + ArcDiskEntry->CheckSum == 0 &&
|
||||||
strcmp(KeLoaderBlock->ArcBootDeviceName, ArcDiskEntry->ArcName) == 0)
|
strcmp(KeLoaderBlock->ArcBootDeviceName, ArcDiskEntry->ArcName) == 0)
|
||||||
{
|
{
|
||||||
IsBootCdRom = TRUE;
|
IsBootCdRom = TRUE;
|
||||||
|
|
Loading…
Reference in a new issue