qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Eric Blake <eblake@redhat.com>
To: Markus Armbruster <armbru@redhat.com>
Cc: aliguori@us.ibm.com, lersek@redhat.com, qemu-devel@nongnu.org,
	ehabkost@redhat.com
Subject: Re: [Qemu-devel] [PATCH 3/7] smbios: Improve diagnostics for conflicting entries
Date: Wed, 17 Jul 2013 13:09:21 -0600	[thread overview]
Message-ID: <51E6EBE1.7070503@redhat.com> (raw)
In-Reply-To: <1374081369-1511-4-git-send-email-armbru@redhat.com>

[-- Attachment #1: Type: text/plain, Size: 1278 bytes --]

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.
> 
> We do this by searching the SMBIOS blob for a previously added table
> or field.  Error messages look like this:
> 
>     qemu-system-x86_64: -smbios type=1,serial=42: SMBIOS type 1 table already defined, cannot add field
> 
> User needs to know that "table" is defined by -smbios file=..., and
> "field" by -smbios type=...
> 
> Instead of searching the blob, record additions of interest, and check
> that.  Simpler, and makes better error messages possible:
> 
>     qemu-system-x86_64: -smbios file=smbios_type_1.bin: Can't mix file= and type= for same type
>     qemu-system-x86_64: -smbios type=1,serial=42,serial=99: This is the conflicting setting
> 
> Signed-off-by: Markus Armbruster <armbru@redhat.com>
> ---
>  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 <eblake@redhat.com>

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 621 bytes --]

  reply	other threads:[~2013-07-17 19:09 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-07-17 17:16 [Qemu-devel] [PATCH 0/7] smbios cleanup & nicer defaults for type 1 Markus Armbruster
2013-07-17 17:16 ` [Qemu-devel] [PATCH 1/7] smbios: Normalize smbios_entry_add()'s error handling to exit(1) Markus Armbruster
2013-07-17 17:53   ` Eric Blake
2013-07-17 17:16 ` [Qemu-devel] [PATCH 2/7] smbios: Convert to QemuOpts Markus Armbruster
2013-07-17 19:04   ` Eric Blake
2013-07-17 17:16 ` [Qemu-devel] [PATCH 3/7] smbios: Improve diagnostics for conflicting entries Markus Armbruster
2013-07-17 19:09   ` Eric Blake [this message]
2013-07-17 17:16 ` [Qemu-devel] [PATCH 4/7] smbios: Make multiple -smbios type= accumulate sanely Markus Armbruster
2013-07-17 19:21   ` Eric Blake
2013-07-17 20:31     ` Markus Armbruster
2013-07-17 17:16 ` [Qemu-devel] [PATCH 5/7] smbios: Factor out smbios_maybe_add_str() Markus Armbruster
2013-07-17 19:22   ` Eric Blake
2013-07-17 17:16 ` [Qemu-devel] [PATCH 6/7] vl: Set current_machine early Markus Armbruster
2013-07-17 19:23   ` Eric Blake
2013-07-17 17:16 ` [Qemu-devel] [PATCH 7/7] smbios: Set system manufacturer, product & version by default Markus Armbruster
2013-07-17 19:24   ` Eric Blake
2013-07-30  6:01 ` [Qemu-devel] [PATCH 0/7] smbios cleanup & nicer defaults for type 1 Markus Armbruster

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=51E6EBE1.7070503@redhat.com \
    --to=eblake@redhat.com \
    --cc=aliguori@us.ibm.com \
    --cc=armbru@redhat.com \
    --cc=ehabkost@redhat.com \
    --cc=lersek@redhat.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).