From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MGfVj-0004RB-0f for qemu-devel@nongnu.org; Tue, 16 Jun 2009 16:44:03 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MGfVe-0004PL-8A for qemu-devel@nongnu.org; Tue, 16 Jun 2009 16:44:02 -0400 Received: from [199.232.76.173] (port=48729 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MGfVe-0004PF-4z for qemu-devel@nongnu.org; Tue, 16 Jun 2009 16:43:58 -0400 Received: from e37.co.us.ibm.com ([32.97.110.158]:36174) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1MGfVd-0005Ak-OA for qemu-devel@nongnu.org; Tue, 16 Jun 2009 16:43:57 -0400 Received: from d03relay02.boulder.ibm.com (d03relay02.boulder.ibm.com [9.17.195.227]) by e37.co.us.ibm.com (8.13.1/8.13.1) with ESMTP id n5GKhFE4006722 for ; Tue, 16 Jun 2009 14:43:15 -0600 Received: from d03av04.boulder.ibm.com (d03av04.boulder.ibm.com [9.17.195.170]) by d03relay02.boulder.ibm.com (8.13.8/8.13.8/NCO v9.2) with ESMTP id n5GKhunH261882 for ; Tue, 16 Jun 2009 14:43:56 -0600 Received: from d03av04.boulder.ibm.com (loopback [127.0.0.1]) by d03av04.boulder.ibm.com (8.12.11.20060308/8.13.3) with ESMTP id n5GKhuJI008744 for ; Tue, 16 Jun 2009 14:43:56 -0600 Message-ID: <4A38040B.5090109@us.ibm.com> Date: Tue, 16 Jun 2009 15:43:55 -0500 From: Anthony Liguori MIME-Version: 1.0 Subject: Re: [Qemu-devel] [PATCH] Add/Fix command-line checks for smbios options v2 References: <1243594098-6772-1-git-send-email-eak@us.ibm.com> In-Reply-To: <1243594098-6772-1-git-send-email-eak@us.ibm.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Beth Kon Cc: qemu-devel@nongnu.org, alex.williamson@hp.com 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 > -- > > 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