[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[dmidecode] [PATCH] dmidecode: Clarify error message on table read failu

From: Jean Delvare
Subject: [dmidecode] [PATCH] dmidecode: Clarify error message on table read failure
Date: Mon, 4 Jul 2016 11:27:57 +0200

Stop using the term "unreachable" when the DMI table can't be read. It
originates from the /dev/mem access method, but no longer makes sense
when reading from sysfs or from a binary dump file.

Also don't suggest building with -DUSE_MMAP if reading from sysfs, as
it wouldn't help anyway.
 dmidecode.c |    7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

--- dmidecode.orig/dmidecode.c  2016-06-30 11:50:30.501728766 +0200
+++ dmidecode/dmidecode.c       2016-07-04 11:19:02.350581000 +0200
@@ -4550,11 +4550,12 @@ static void dmi_table(off_t base, u32 le
        if (buf == NULL)
-               fprintf(stderr, "Table is unreachable, sorry."
+               fprintf(stderr, "Failed to read table, sorry.\n");
 #ifndef USE_MMAP
-                       " Try compiling dmidecode with -DUSE_MMAP."
+               if (!(flags & FLAG_NO_FILE_OFFSET))
+                       fprintf(stderr,
+                               "Try compiling dmidecode with -DUSE_MMAP.\n");
-                       "\n");

Jean Delvare
SUSE L3 Support

reply via email to

[Prev in Thread] Current Thread [Next in Thread]