Author: pschweitzer
Date: Thu Oct 7 19:16:09 2010
New Revision: 49040
URL:
http://svn.reactos.org/svn/reactos?rev=49040&view=rev
Log:
[FREELDR]
Fix CDs checksum computation
[NTOSKRNL]
Fix ARC names accordingly
Modified:
trunk/reactos/boot/freeldr/freeldr/arch/i386/hardware.c
trunk/reactos/ntoskrnl/io/iomgr/arcname.c
Modified: trunk/reactos/boot/freeldr/freeldr/arch/i386/hardware.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/arch/…
==============================================================================
--- trunk/reactos/boot/freeldr/freeldr/arch/i386/hardware.c [iso-8859-1] (original)
+++ trunk/reactos/boot/freeldr/freeldr/arch/i386/hardware.c [iso-8859-1] Thu Oct 7
19:16:09 2010
@@ -1004,6 +1004,7 @@
/* Calculate the MBR checksum */
for (i = 0; i < 2048 / sizeof(ULONG); i++) Checksum += Buffer[i];
+ Checksum = ~Checksum + 1;
DPRINTM(DPRINT_HWDETECT, "Checksum: %x\n", Checksum);
/* Fill out the ARC disk block */
Modified: trunk/reactos/ntoskrnl/io/iomgr/arcname.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/io/iomgr/arcname.…
==============================================================================
--- trunk/reactos/ntoskrnl/io/iomgr/arcname.c [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/io/iomgr/arcname.c [iso-8859-1] Thu Oct 7 19:16:09 2010
@@ -368,7 +368,7 @@
ARC_DISK_SIGNATURE,
ListEntry);
/* And check if checksums and arc names match */
- if (CheckSum == ArcDiskEntry->CheckSum &&
+ if (CheckSum + ArcDiskEntry->CheckSum == 0 &&
strcmp(KeLoaderBlock->ArcBootDeviceName, ArcDiskEntry->ArcName) == 0)
{
IsBootCdRom = TRUE;