From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1M9jyu-0002bA-3C for qemu-devel@nongnu.org; Thu, 28 May 2009 14:05:32 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1M9jyp-0002ae-H0 for qemu-devel@nongnu.org; Thu, 28 May 2009 14:05:31 -0400 Received: from [199.232.76.173] (port=59312 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1M9jyp-0002ab-Do for qemu-devel@nongnu.org; Thu, 28 May 2009 14:05:27 -0400 Received: from g4t0016.houston.hp.com ([15.201.24.19]:31691) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1M9jyo-000696-Ne for qemu-devel@nongnu.org; Thu, 28 May 2009 14:05:26 -0400 From: Alex Williamson In-Reply-To: <1243533236-27813-1-git-send-email-eak@us.ibm.com> References: <1243533236-27813-1-git-send-email-eak@us.ibm.com> Content-Type: text/plain Date: Thu, 28 May 2009 12:02:03 -0600 Message-Id: <1243533723.25164.50.camel@bling> Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [Qemu-devel] Re: [PATCH] Add/Fix command-line checks for smbios options List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Beth Kon Cc: qemu-devel@nongnu.org On Thu, 2009-05-28 at 13:53 -0400, Beth Kon wrote: > - One type 4 table is required per cpu. Add a check for this. > - Fix check for smbios file. > > Signed-off-by: Beth Kon > -- > > diff --git a/hw/smbios.c b/hw/smbios.c > index ced90ce..2bc5c67 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; > + > +void smbios_validate_table(void) { static? > + if (smbios_type4_count && smbios_type4_count != smp_cpus) { > + fprintf(stderr, > + "Number of SMBIOS Type 4 tables must match cpu count.\n"); extra space. Looks ok otherwise. Thanks, Alex