32 lines
1.0 KiB
Diff
32 lines
1.0 KiB
Diff
|
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.5.0
|
||
|
|