diff options
author | Raymond Mao <raymond.mao@linaro.org> | 2024-12-06 14:54:18 -0800 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2025-01-14 14:29:29 -0600 |
commit | 8aa5f8e02f7869d2d4131b04eb35b6ea948da80c (patch) | |
tree | 99efc8d8afcd11f1ab191b183cce3c9cf6e8c5b5 /cmd | |
parent | d92fdb60677b3990919a4216d3452418db215224 (diff) |
smbios: Refactor the smbios headfile
Move the smbios field definitions to a separated simple headfile,
which is a prerequisite to be included by dts files.
Add new definitions for cache information.
This patch also includes a few of code optimizations in smbios.
Signed-off-by: Raymond Mao <raymond.mao@linaro.org>
Acked-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Diffstat (limited to 'cmd')
-rw-r--r-- | cmd/smbios.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/cmd/smbios.c b/cmd/smbios.c index d3bd8b12a67..2122ac04e55 100644 --- a/cmd/smbios.c +++ b/cmd/smbios.c @@ -99,12 +99,12 @@ static void smbios_print_type1(struct smbios_type1 *table) smbios_print_str("Product Name", table, table->product_name); smbios_print_str("Version", table, table->version); smbios_print_str("Serial Number", table, table->serial_number); - if (table->length >= 0x19) { + if (table->hdr.length >= SMBIOS_TYPE1_LENGTH_V21) { printf("\tUUID: %pUl\n", table->uuid); printf("\tWake-up Type: %s\n", smbios_wakeup_type_str(table->wakeup_type)); } - if (table->length >= 0x1b) { + if (table->hdr.length >= SMBIOS_TYPE1_LENGTH_V24) { smbios_print_str("SKU Number", table, table->sku_number); smbios_print_str("Family", table, table->family); } |