summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorRaymond Mao <[email protected]>2024-12-06 14:54:26 -0800
committerTom Rini <[email protected]>2025-01-14 14:29:29 -0600
commite6285168f8df3801c7a0583ec778ace3a6817e6b (patch)
treef429b17a939badca295112cf8f6deb42d924a46f /include
parent86898a98fdd5f528f5f71a66902fbe95de5927e6 (diff)
cmd: update smbios cmd
Update the cmd according to the changes of the smbios library: 1. Refactor smbios cmd print functions to match the content defined by the specification. 2. Add new print functions for Type 3, 4 and 7. 3. Remove the fallback string "Not specified" from smbios_get_string, as the spec requires a NULL output for those undefined strings. 4. Update the test_cmd_smbios_sandbox pytest expected result to align with the smbios library changes and add new pytest test_cmd_smbios_sysinfo_verbose to test the verbose smbios output. Signed-off-by: Raymond Mao <[email protected]>
Diffstat (limited to 'include')
-rw-r--r--include/smbios.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/smbios.h b/include/smbios.h
index 18f568f9b0d..b5fed57aba2 100644
--- a/include/smbios.h
+++ b/include/smbios.h
@@ -38,6 +38,11 @@ enum {
#define SMBIOS_INTERMEDIATE_OFFSET 16
#define SMBIOS_STRUCT_EOS_BYTES 2
+struct str_lookup_table {
+ u16 idx;
+ const char *str;
+};
+
struct __packed smbios_entry {
u8 anchor[4];
u8 checksum;