ACK: [PATCH 1/2] lib: fwts_smbios: fix the smbios version from uefi always zero (LP: #1484023)

Alex Hung alex.hung at canonical.com
Tue Aug 18 06:07:29 UTC 2015


On 08/14/2015 11:17 AM, Ivan Hu wrote:
> The version of the smbios will always zero, if the smbios table got from the
> uefi bios system table.
> 
> Signed-off-by: Ivan Hu <ivan.hu at canonical.com>
> ---
>  src/lib/src/fwts_smbios.c | 6 +++++-
>  1 file changed, 5 insertions(+), 1 deletion(-)
> 
> diff --git a/src/lib/src/fwts_smbios.c b/src/lib/src/fwts_smbios.c
> index cd537de..3b22a02 100644
> --- a/src/lib/src/fwts_smbios.c
> +++ b/src/lib/src/fwts_smbios.c
> @@ -103,7 +103,11 @@ void *fwts_smbios_find_entry(fwts_framework *fw,
>  	*type = FWTS_SMBIOS_UNKNOWN;
>  
>  	/* Check EFI first */
> -	if ((addr = fwts_smbios_find_entry_uefi(fw, entry, type)) == NULL) {
> +	addr = fwts_smbios_find_entry_uefi(fw, entry, type);
> +	if (addr) {
> +		*version = (entry->major_version << 8) +
> +					(entry->minor_version & 0xff);
> +	} else {
>  #if defined(FWTS_ARCH_INTEL)
>  		/* Failed? then scan x86 memory for SMBIOS tag  */
>  		addr = fwts_smbios_find_entry_bios(fw, entry, type);
> 

Ackecd-by: Alex Hung <alex.hung at canonical.com>



More information about the fwts-devel mailing list