From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:32873) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UzX6M-00065E-DU for qemu-devel@nongnu.org; Wed, 17 Jul 2013 15:09:29 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UzX6J-00081g-Ks for qemu-devel@nongnu.org; Wed, 17 Jul 2013 15:09:26 -0400 Received: from mx1.redhat.com ([209.132.183.28]:25179) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UzX6J-00081T-CH for qemu-devel@nongnu.org; Wed, 17 Jul 2013 15:09:23 -0400 Message-ID: <51E6EBE1.7070503@redhat.com> Date: Wed, 17 Jul 2013 13:09:21 -0600 From: Eric Blake MIME-Version: 1.0 References: <1374081369-1511-1-git-send-email-armbru@redhat.com> <1374081369-1511-4-git-send-email-armbru@redhat.com> In-Reply-To: <1374081369-1511-4-git-send-email-armbru@redhat.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="----enig2FEPJDIRHQDQOLLXOPJBC" Subject: Re: [Qemu-devel] [PATCH 3/7] smbios: Improve diagnostics for conflicting entries List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Markus Armbruster Cc: aliguori@us.ibm.com, lersek@redhat.com, qemu-devel@nongnu.org, ehabkost@redhat.com This is an OpenPGP/MIME signed message (RFC 4880 and 3156) ------enig2FEPJDIRHQDQOLLXOPJBC Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On 07/17/2013 11:16 AM, Markus Armbruster wrote: > We allow either tables or fields for the same type. Makes sense, > because SeaBIOS uses fields only when no tables are present. >=20 > We do this by searching the SMBIOS blob for a previously added table > or field. Error messages look like this: >=20 > qemu-system-x86_64: -smbios type=3D1,serial=3D42: SMBIOS type 1 tab= le already defined, cannot add field >=20 > User needs to know that "table" is defined by -smbios file=3D..., and > "field" by -smbios type=3D... >=20 > Instead of searching the blob, record additions of interest, and check > that. Simpler, and makes better error messages possible: >=20 > qemu-system-x86_64: -smbios file=3Dsmbios_type_1.bin: Can't mix fil= e=3D and type=3D for same type > qemu-system-x86_64: -smbios type=3D1,serial=3D42,serial=3D99: This = is the conflicting setting >=20 > Signed-off-by: Markus Armbruster > --- > hw/i386/smbios.c | 43 +++++++++++++++++-------------------------- > 1 file changed, 17 insertions(+), 26 deletions(-) Nicer message in fewer lines of code - what's not to like about it? Reviewed-by: Eric Blake --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org ------enig2FEPJDIRHQDQOLLXOPJBC Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.13 (GNU/Linux) Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBCAAGBQJR5uvhAAoJEKeha0olJ0Nq32IIAKub0ZpQ0D0d2Xs1FVbFfl5w 05KhN69znrphHxXrveHCoqTnFM8XYOwCNK9hfCBradoQGRaC1V+bk4nAPF52N/v5 hI5Dk3a7dKNWvDE55cE45IIrqh+3ImFPBbBwSo16tQQQyXN/K8YsNiuKoJUyqHL/ mH2D7B3qg9oazgtXvNLE7ikY4QZpkzyZtXwXgF8lBx31KRqaTatGCXJwsfAvWblv f9MuL2+uhghzB7O15MitL+7ves8aXBlMP9v0n0S35C7vkKpsSWyOpnOtbHQhpRUM H9BT7LRHfv1jRj2xQNkbjPeqN7NYOqf9wkOtIiuYrIVsLCRm8XBwwqfDZfYp2+k= =s/W4 -----END PGP SIGNATURE----- ------enig2FEPJDIRHQDQOLLXOPJBC--