address_from_efi may return a smbios or smbios3 format tables, so add this condition.
Signed-off-by: Xie XiuQi <[email protected]> --- dmidecode.c | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/dmidecode.c b/dmidecode.c index f41c85b..cd51f7a 100644 --- a/dmidecode.c +++ b/dmidecode.c @@ -4864,8 +4864,21 @@ int main(int argc, char * const argv[]) goto exit_free; } - if (smbios_decode(buf, opt.devmem, 0)) - found++; + if (memcmp(buf, "_SM3_", 5) == 0) + { + if (smbios3_decode(buf, opt.devmem, 0)) + found++; + } + else if (memcmp(buf, "_SM_", 4) == 0) + { + if (smbios_decode(buf, opt.devmem, 0)) + found++; + } + else if (memcmp(buf, "_DMI_", 5) == 0) + { + if (legacy_decode(buf, opt.devmem, 0)) + found++; + } goto done; memory_scan: -- 1.8.3.1 _______________________________________________ https://lists.nongnu.org/mailman/listinfo/dmidecode-devel
