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