dmidecode-devel
[Top][All Lists]
Advanced

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

Re: [dmidecode] [PATCH] fix 'No SMBIOS nor DMI entry point found' on SMB


From: Jean Delvare
Subject: Re: [dmidecode] [PATCH] fix 'No SMBIOS nor DMI entry point found' on SMBIOS3
Date: Wed, 21 Oct 2015 11:47:20 +0200

Hi Xiu Qi,

On Mon, 19 Oct 2015 15:39:35 +0800, Xie XiuQi wrote:
> address_from_efi may return a smbios or smbios3 format tables,
> so add this condition.

Thanks for the report and the patch (one comment below.) I do not have
access to an UEFI-enabled system implementing SMBIOS 3.0 so I did not
notice the problem.

> 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++;
> +     }

This last block should not be needed? SMBIOS 2.0 was released before
EFI and I do not think EFI supports legacy DMI at all.

>       goto done;
>  
>  memory_scan:


-- 
Jean Delvare
SUSE L3 Support



reply via email to

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