qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH] Add/Fix command-line checks for smbios options


From: Anthony Liguori
Subject: Re: [Qemu-devel] [PATCH] Add/Fix command-line checks for smbios options v2
Date: Tue, 16 Jun 2009 15:43:55 -0500
User-agent: Thunderbird 2.0.0.21 (X11/20090320)

Beth Kon wrote:
(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);
+    }
+}


Please format according to CodingStyle.

--
Regards,

Anthony Liguori





reply via email to

[Prev in Thread] Current Thread [Next in Thread]