[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[dmidecode] [PATCH] dmidecode: Fix --dump-bin when reading from sysfs
From: |
Jean Delvare |
Subject: |
[dmidecode] [PATCH] dmidecode: Fix --dump-bin when reading from sysfs |
Date: |
Tue, 21 Apr 2015 13:43:34 +0200 |
FLAG_NO_FILE_OFFSET must be honored also in --dump-bin mode.
As a side effect, the --dump-bin mode becomes a little more verbose by
default, but I don't think this is a problem. It can still be silenced
completely with -q if needed.
---
dmidecode.c | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
--- dmidecode.orig/dmidecode.c 2015-04-21 11:59:00.501358600 +0200
+++ dmidecode/dmidecode.c 2015-04-21 12:47:42.489649782 +0200
@@ -4387,12 +4387,6 @@ static void dmi_table(off_t base, u32 le
SUPPORTED_SMBIOS_VER >> 8, SUPPORTED_SMBIOS_VER & 0xFF);
}
- if (opt.flags & FLAG_DUMP_BIN)
- {
- dmi_table_dump(base, len, devmem);
- return;
- }
-
if (!(opt.flags & FLAG_QUIET))
{
if (opt.type == NULL)
@@ -4416,6 +4410,12 @@ static void dmi_table(off_t base, u32 le
if (flags & FLAG_NO_FILE_OFFSET)
base = 0;
+ if (opt.flags & FLAG_DUMP_BIN)
+ {
+ dmi_table_dump(base, len, devmem);
+ return;
+ }
+
if ((buf = mem_chunk(base, len, devmem)) == NULL)
{
fprintf(stderr, "Table is unreachable, sorry."
--
Jean Delvare
SUSE L3 Support
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [dmidecode] [PATCH] dmidecode: Fix --dump-bin when reading from sysfs,
Jean Delvare <=