dmidecode-devel
[Top][All Lists]
Advanced

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

Re: [dmidecode] [PATCH 1/2] dmioem: Decode HPE OEM Record 240


From: Jean Delvare
Subject: Re: [dmidecode] [PATCH 1/2] dmioem: Decode HPE OEM Record 240
Date: Tue, 12 Jan 2021 11:38:46 +0100

Hi Jerry,

On Tue, 12 Jan 2021 00:41:55 -0700, Jerry Hoemann wrote:
> On Tue, Jan 05, 2021 at 01:56:09PM +0100, Jean Delvare wrote:
> > To be on the safe side, please start with a length check as is done for
> > regular DMI types (although apparently not all OEM types - will look
> > into that).  
> 
> I think you mean a check like:
>                         pr_handle_name("%s Proliant Inventory Record", 
> company);
>                         if (h->length < 0x24) break;
> 
> before decoding any fields?

Yes.

> Looks like record 236 (commit d9b84ea) should have done something similar.
> I'll fix record 236 as a separate patch.

Thank you.

> > (...)
> > Could we use dmi_print_memory_size() here so that the size is
> > automatically expressed in the most suitable unit?  
> 
> dmi_print_memory_size() is defined statically in dmidecode.c.
> 
> Will make global and put prototype in dmidecode.h

Sure :-)

-- 
Jean Delvare
SUSE L3 Support



reply via email to

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