From a37701afa373dbe35f307614779f43183fd53151 Mon Sep 17 00:00:00 2001 From: Angel Pons Date: Mon, 28 Jun 2021 17:36:53 +0200 Subject: SMBIOS: Introduce `smbios_full_table_len` function MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Introduce the `smbios_full_table_len` function to consolidate table length calculation. The case where the length of a table equals the length of the structure happens when a table has no strings. Change-Id: Ibc60075e82eb66b5d0b7132b16da000b153413f9 Signed-off-by: Angel Pons Reviewed-on: https://review.coreboot.org/c/coreboot/+/55909 Tested-by: build bot (Jenkins) Reviewed-by: Tim Wawrzynczak Reviewed-by: Michał Żygowski --- src/include/smbios.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/include') diff --git a/src/include/smbios.h b/src/include/smbios.h index 83900990b9..edc56f706d 100644 --- a/src/include/smbios.h +++ b/src/include/smbios.h @@ -10,6 +10,8 @@ unsigned long smbios_write_tables(unsigned long start); int smbios_add_string(u8 *start, const char *str); int smbios_string_table_len(u8 *start); +struct smbios_header; +int smbios_full_table_len(struct smbios_header *header, u8 *str_table_start); void *smbios_carve_table(unsigned long start, u8 type, u8 length, u16 handle); /* Used by mainboard to add an on-board device */ -- cgit v1.2.3