summaryrefslogtreecommitdiffstats
path: root/source/ap/dmidecode/patches/0006-dmidecode-Introduce-SYS_FIRMWARE_DIR.patch
blob: 8e03c89e5446605546e84ee21a3d7de2db00bda4 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
From 2330b708a6d57fd2b8b7e353dd64d037f980a042 Mon Sep 17 00:00:00 2001
From: Jean Delvare <jdelvare@suse.de>
Date: Mon, 2 Nov 2015 09:45:13 +0100
Subject: [PATCH 6/9] dmidecode: Introduce SYS_FIRMWARE_DIR

Have SYS_FIRMWARE_DIR point to the sysfs directory where our files
live, and use it in the definition of their paths. This makes it
easier to temporarily point somewhere else for debugging.
---
 dmidecode.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/dmidecode.c b/dmidecode.c
index cfcade4..183ced4 100644
--- a/dmidecode.c
+++ b/dmidecode.c
@@ -74,8 +74,9 @@ static const char *bad_index = "<BAD INDEX>";
 #define FLAG_NO_FILE_OFFSET     (1 << 0)
 #define FLAG_STOP_AT_EOT        (1 << 1)
 
-#define SYS_ENTRY_FILE "/sys/firmware/dmi/tables/smbios_entry_point"
-#define SYS_TABLE_FILE "/sys/firmware/dmi/tables/DMI"
+#define SYS_FIRMWARE_DIR "/sys/firmware/dmi/tables"
+#define SYS_ENTRY_FILE SYS_FIRMWARE_DIR "/smbios_entry_point"
+#define SYS_TABLE_FILE SYS_FIRMWARE_DIR "/DMI"
 
 /*
  * Type-independant Stuff
-- 
2.6.4