aboutsummaryrefslogtreecommitdiff
path: root/lib/crypt/crypt.c
diff options
context:
space:
mode:
authorIlias Apalodimas <ilias.apalodimas@linaro.org>2023-12-07 11:18:49 +0200
committerTom Rini <trini@konsulko.com>2023-12-20 14:13:20 -0500
commita986ccea541b8e38ca219dc142f1bfef9a93ab66 (patch)
treebaf18aed19533d0bb32e12ab6152959a37b63fcd /lib/crypt/crypt.c
parent4268ef9282c5870aaf45375e3816d0a8c644b214 (diff)
smbios: Simplify reporting of unknown values
If a value is not valid during the DT or SYSINFO parsing, we explicitly set that to "Unknown Product" and "Unknown" for the product and manufacturer respectively. It's cleaner if we move the checks insisde smbios_add_prop_si() and provide an alternative string in case the primary is NULL or empty pre-patch dmidecode <snip> Handle 0x0001, DMI type 1, 27 bytes System Information Manufacturer: Unknown Product Name: Unknown Product Version: Not Specified Serial Number: Not Specified UUID: Not Settable Wake-up Type: Reserved SKU Number: Not Specified Family: Not Specified [...] post-patch dmidecode: Handle 0x0001, DMI type 1, 27 bytes System Information Manufacturer: Unknown Product Name: Unknown Version: Unknown Serial Number: Unknown UUID: Not Settable Wake-up Type: Reserved SKU Number: Unknown Family: Unknown [...] While at it make smbios_add_prop_si() add a string directly if the prop node is NULL and replace smbios_add_string() calls with smbios_add_prop_si(ctx, NULL, ....) Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org> Reviewed-by: Peter Robinson <pbrobinson@gmail.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
Diffstat (limited to 'lib/crypt/crypt.c')
0 files changed, 0 insertions, 0 deletions