[PATCH 1/1] smbios: amend the description of smbios_string()
Heinrich Schuchardt
heinrich.schuchardt at canonical.com
Thu Oct 21 11:16:31 CEST 2021
Add a warning that this function only works for strings preceding the first
non-string field.
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt at canonical.com>
---
include/smbios.h | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/include/smbios.h b/include/smbios.h
index aa6b6f3849..b7a1b8e412 100644
--- a/include/smbios.h
+++ b/include/smbios.h
@@ -258,6 +258,10 @@ const struct smbios_header *smbios_header(const struct smbios_entry *entry, int
/**
* smbios_string() - Return string from SMBIOS
*
+ * This function counts the zero bytes at the end of strings to identify the
+ * string to retrieve. This only works up to the first non-string field in the
+ * table.
+ *
* @header: pointer to struct smbios_header
* @index: string index
* @return: NULL or a valid const char pointer
--
2.32.0
More information about the U-Boot
mailing list