dmidecode-devel
[Top][All Lists]
Advanced

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

Re: [PATCH] dmioem: Update HPE OEM type 242


From: Jean Delvare
Subject: Re: [PATCH] dmioem: Update HPE OEM type 242
Date: Tue, 11 Jul 2023 13:24:41 +0200

On Thu,  6 Jul 2023 19:54:25 -0600, Jerry Hoemann wrote:
> Additional form factors.
> 
> Signed-off-by: Jerry Hoemann <jerry.hoemann@hpe.com>
> ---
>  dmioem.c | 9 +++++++++
>  1 file changed, 9 insertions(+)
> 
> diff --git a/dmioem.c b/dmioem.c
> index 5e5c2da..8d351d3 100644
> --- a/dmioem.c
> +++ b/dmioem.c
> @@ -759,8 +759,17 @@ static void dmi_hp_242_form_factor(u8 code)
>               "MicroSSD",
>               "CFast", /* 0x09 */
>       };
> +     static const char * const form2[] = {
> +             "EDSFF Unknown", /* 0x20 */
> +             "EDSFF 1U Short",
> +             "EDSFF 1U Long",
> +             "EDSFF E3 Short",
> +             "EDSFF E3 Long", /* 0x24 */
> +     };
>       if (code < ARRAY_SIZE(form))
>               str = form[code];
> +     else if ((code >= 0x20) && ((u8)(code - 0x20) < ARRAY_SIZE(form2)))
> +             str = form2[code - 0x20];
>  
>       pr_attr("Form Factor", "%s", str);
>  }

Applied (with a small arithmetic cleanup), thanks.

-- 
Jean Delvare
SUSE L3 Support



reply via email to

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