aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@zytor.com>2010-02-06 23:26:00 -0800
committerH. Peter Anvin <hpa@zytor.com>2010-02-06 23:26:00 -0800
commit4d042afa499f879317b2c18dafd714751bd951ba (patch)
treee5e95d2775a1ec67ccc85729da327a37a3e88802
parent33e6490865b14e331e6da82570cc0783252005d0 (diff)
downloadsyslinux.git-4d042afa499f879317b2c18dafd714751bd951ba.tar.gz
syslinux.git-4d042afa499f879317b2c18dafd714751bd951ba.tar.xz
syslinux.git-4d042afa499f879317b2c18dafd714751bd951ba.zip
sysdump: fix hacking of the DMI structure address
Fix the hacking of the DMI structure address, for dmidecode's sake. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
-rw-r--r--com32/sysdump/dmi.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/com32/sysdump/dmi.c b/com32/sysdump/dmi.c
index a64e5c1e..9e57b4b7 100644
--- a/com32/sysdump/dmi.c
+++ b/com32/sysdump/dmi.c
@@ -69,12 +69,11 @@ static void dump_smbios(struct backend *be, size_t dptr)
/*
* Adjust the address of the smbios table to be 32, to
- * make dmidecode happy. According to dmidecode, the checksum on
- * the smbios structure doesn't need to be adjusted, for whatever
- * reason...
+ * make dmidecode happy. The checksum on the smbios table is unchanged,
+ * since it includes the checksum on the dmi table.
*/
smx.dmi.tbladdr = sizeof smx;
- smx.dmi.csum -= checksum(&smb->dmi, 0x0f);
+ smx.dmi.csum -= checksum(&smx.dmi, 0x0f);
write_data(be, &smx, sizeof smx, false);
write_data(be, (const void *)smb->dmi.tbladdr, smb->dmi.tbllen, false);
@@ -92,9 +91,7 @@ static void dump_old_dmi(struct backend *be, size_t dptr)
/*
* Adjust the address of the smbios table to be 32, to
- * make dmidecode happy. According to dmidecode, the checksum on
- * the smbios structure doesn't need to be adjusted, for whatever
- * reason...
+ * make dmidecode happy.
*/
fake.dmi = *dmi;
memset(&fake.pad, 0, sizeof fake.pad);