x86/smbios: Return index 0 for empty strings
commit6b07cba70fa25ebce4c764a0d7309c34e5964d74
authorBen Gardner <gardner.ben@gmail.com>
Wed, 9 Dec 2015 17:24:35 +0000 (9 11:24 -0600)
committerMartin Roth <martinroth@google.com>
Wed, 16 Dec 2015 00:20:00 +0000 (16 01:20 +0100)
treeeedef749f0d99220c11b65b9d80f5d8682b88265
parent6f656138a63dbc4fe508eec19dc2f17d01e8d155
x86/smbios: Return index 0 for empty strings

Section 6.1.3 (Text Strings) of the SMBIOS specification states:
  If a string field references no string, a null (0) is placed in that
  string field.

Change smbios_add_string() to do that.

Change-Id: I9c28cb89dcfe2c8ef2366c23ee6203e15b7c2513
Signed-off-by: Ben Gardner <gardner.ben@gmail.com>
Reviewed-on: https://review.coreboot.org/12697
Tested-by: build bot (Jenkins)
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
src/arch/x86/smbios.c