aboutsummaryrefslogtreecommitdiff
path: root/lib/smbios-parser.c
diff options
context:
space:
mode:
authorHeinrich Schuchardt <heinrich.schuchardt@canonical.com>2024-01-29 14:09:36 +0100
committerHeinrich Schuchardt <heinrich.schuchardt@canonical.com>2024-02-02 19:56:54 +0100
commit6ebf9136ec24c03f6ebeb6ec6d684ce55c2a4320 (patch)
treed618c1385766b47f4d67e44c9e23237b0a0a0108 /lib/smbios-parser.c
parente31efe50b5cce46a2ee68c96db445e0a3d481aa8 (diff)
smbios: if a string value is unknown, use string number 0
The SMBIOS specification describes: "If a string field references no string, a null (0) is placed in that string field." Accordingly we should avoid writing a string "Unknown" to the SMBIOS table. dmidecode displays 'Not Specified' if the string number is 0. Commit 00a871d34e2f ("smbios: empty strings in smbios_add_string()") correctly identified that strings may not have length 0 as two consecutive NULs indentify the end of the string list. But the suggested solution did not match the intent of the SMBIOS specification. Fixes: 00a871d34e2f ("smbios: empty strings in smbios_add_string()") Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com> Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Diffstat (limited to 'lib/smbios-parser.c')
0 files changed, 0 insertions, 0 deletions