(Resending with "v2" in subject line)
- One type 4 table is required per cpu. Add a check for this.
- Fix check for smbios file.
Changes from v1:
- static designation of smbios_validate_table, and remove whitespace
Signed-off-by: Beth Kon <address@hidden>
--
diff --git a/hw/smbios.c b/hw/smbios.c
index ced90ce..57d2c2d 100644
--- a/hw/smbios.c
+++ b/hw/smbios.c
@@ -40,9 +40,19 @@ struct smbios_table {
static uint8_t *smbios_entries;
static size_t smbios_entries_len;
+static int smbios_type4_count = 0;
+
+static void smbios_validate_table(void) {
+ if (smbios_type4_count && smbios_type4_count != smp_cpus) {
+ fprintf(stderr,
+ "Number of SMBIOS Type 4 tables must match cpu count.\n");
+ exit(1);
+ }
+}