File 0001-Continue-without-dmi-when-no-SMBIOS-or-SMBIOS-0x0-in.patch of Package mcelog.635

From ecc77ed1fc6833065800c8a055de219f77b95bb4 Mon Sep 17 00:00:00 2001
From: Julian Wolf <juwolf@suse.com>
Date: Fri, 4 Jul 2014 13:04:52 +0200
Subject: [PATCH 1/1] Continue without dmi when no SMBIOS or SMBIOS=0x0 in
 /sys/firmware/efi/systab, bnc#829862

Signed-off-by: Julian Wolf <juwolf@suse.de>
Signed-off-by: Thomas Renninger <trenn@suse.de>
---
 dmi.c | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/dmi.c b/dmi.c
index 373837e..402459a 100644
--- a/dmi.c
+++ b/dmi.c
@@ -174,8 +174,10 @@ check_symbol:
 	if (fclose(efi_systab) != 0)
 		perror(filename);
 
-	if (!ret)
-		Eprintf("%s: SMBIOS entry point missing", filename);
+	if (!ret || !*address){
+		Lprintf("No valid SMBIOS entry point: Continue without DMI decoding");
+		return 0;
+	}
 
 	if (verbose)
 		printf("%s: SMBIOS entry point at 0x%08lx\n", filename,
@@ -224,6 +226,8 @@ int opendmi(void)
 		}
 		a = (struct anchor*)((char*)abase + (entry_point_addr - addr_start));
 		goto fill_entries;
+	}else{
+		return -1;
 	}
 
 legacy:
-- 
1.8.1.4

openSUSE Build Service is sponsored by