Blame SOURCES/Support-upstream-filename-for-smbios-64-bit-header.patch

3ea658
From 5b47f83914e68f40c57feeaa6582c183556f51c2 Mon Sep 17 00:00:00 2001
3ea658
From: Mark Salter <msalter@redhat.com>
3ea658
Date: Thu, 25 Jun 2015 12:27:03 -0400
3ea658
Subject: [PATCH] Support upstream sysfs filename for smbios entry point
3ea658
3ea658
The existing (preliminary) SMBIOS 64-bit support relies on the
3ea658
SMBIOS entry point to be exposed via sysfs. Since this support
3ea658
was added, the upstream kernel patches have evolved and now use
3ea658
a different filename. This patch checks for the new filename as
3ea658
well as the older name for backwards compatibility.
3ea658
3ea658
Signed-off-by: Mark Salter <msalter@redhat.com>
3ea658
---
3ea658
 libdmifs.c | 2 ++
3ea658
 1 file changed, 2 insertions(+)
3ea658
3ea658
diff --git a/libdmifs.c b/libdmifs.c
3ea658
index ef4e1c1..05c8ea0 100644
3ea658
--- a/libdmifs.c
3ea658
+++ b/libdmifs.c
3ea658
@@ -102,6 +102,8 @@ static int dmi_get_smbios(unsigned char *smbios)
3ea658
 	enum {SMBIOS_SIZE = 32};
3ea658
 
3ea658
 	file = fopen("/sys/firmware/dmi/smbios_raw_header", "rb");
3ea658
+	if (!file)
3ea658
+		file = fopen("/sys/firmware/dmi/tables/smbios_entry_point", "rb");
3ea658
 	if (!file) {
3ea658
 		fprintf(stderr, "no \"smbios\" sysfs entry\n");
3ea658
 		return count;
3ea658
-- 
3ea658
2.4.3
3ea658