Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit dcbff06

Browse files
committed
dmidecode: Clarify error message on table read failure
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.
1 parent 23aa505 commit dcbff06

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

‎dmidecode.c‎

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4550,11 +4550,12 @@ static void dmi_table(off_t base, u32 len, u16 num, u16 ver, const char *devmem,
45504550

45514551
if (buf == NULL)
45524552
{
4553-
fprintf(stderr, "Table is unreachable, sorry."
4553+
fprintf(stderr, "Failed to read table, sorry.\n");
45544554
#ifndef USE_MMAP
4555-
" Try compiling dmidecode with -DUSE_MMAP."
4555+
if (!(flags & FLAG_NO_FILE_OFFSET))
4556+
fprintf(stderr,
4557+
"Try compiling dmidecode with -DUSE_MMAP.\n");
45564558
#endif
4557-
"\n");
45584559
return;
45594560
}
45604561

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /