dmidecode-devel
[Top][All Lists]
Advanced

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

[dmidecode] [PATCH] fix 'No SMBIOS nor DMI entry point found' on SMBIOS3


From: Xie XiuQi
Subject: [dmidecode] [PATCH] fix 'No SMBIOS nor DMI entry point found' on SMBIOS3
Date: Mon, 19 Oct 2015 15:39:35 +0800

address_from_efi may return a smbios or smbios3 format tables,
so add this condition.

Signed-off-by: Xie XiuQi <address@hidden>
---
 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




reply via email to

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