Blame SOURCES/0003-dmidecode-Clarify-error-message-on-table-read-failur.patch
|
|
94a757 |
From dcbff064744f8b7c0d53d6932d25708b4bb13b4f Mon Sep 17 00:00:00 2001
|
|
|
94a757 |
From: Jean Delvare <jdelvare@suse.de>
|
|
|
94a757 |
Date: Fri, 22 Jul 2016 10:26:41 +0200
|
|
|
94a757 |
Subject: [PATCH 3/9] dmidecode: Clarify error message on table read failure
|
|
|
94a757 |
|
|
|
94a757 |
Stop using the term "unreachable" when the DMI table can't be read. It
|
|
|
94a757 |
originates from the /dev/mem access method, but no longer makes sense
|
|
|
94a757 |
when reading from sysfs or from a binary dump file.
|
|
|
94a757 |
|
|
|
94a757 |
Also don't suggest building with -DUSE_MMAP if reading from sysfs, as
|
|
|
94a757 |
it wouldn't help anyway.
|
|
|
94a757 |
---
|
|
|
94a757 |
dmidecode.c | 7 ++++---
|
|
|
94a757 |
1 file changed, 4 insertions(+), 3 deletions(-)
|
|
|
94a757 |
|
|
|
94a757 |
diff --git a/dmidecode.c b/dmidecode.c
|
|
|
94a757 |
index 48d9e66..ffd916c 100644
|
|
|
94a757 |
--- a/dmidecode.c
|
|
|
94a757 |
+++ b/dmidecode.c
|
|
|
94a757 |
@@ -4550,11 +4550,12 @@ static void dmi_table(off_t base, u32 len, u16 num, u16 ver, const char *devmem,
|
|
|
94a757 |
|
|
|
94a757 |
if (buf == NULL)
|
|
|
94a757 |
{
|
|
|
94a757 |
- fprintf(stderr, "Table is unreachable, sorry."
|
|
|
94a757 |
+ fprintf(stderr, "Failed to read table, sorry.\n");
|
|
|
94a757 |
#ifndef USE_MMAP
|
|
|
94a757 |
- " Try compiling dmidecode with -DUSE_MMAP."
|
|
|
94a757 |
+ if (!(flags & FLAG_NO_FILE_OFFSET))
|
|
|
94a757 |
+ fprintf(stderr,
|
|
|
94a757 |
+ "Try compiling dmidecode with -DUSE_MMAP.\n");
|
|
|
94a757 |
#endif
|
|
|
94a757 |
- "\n");
|
|
|
94a757 |
return;
|
|
|
94a757 |
}
|
|
|
94a757 |
|
|
|
94a757 |
--
|
|
|
94a757 |
2.10.2
|