From: Mark McLoughlin <markmc@redhat.com>
To: Juan Quintela <quintela@trasno.org>
Cc: qemu-devel@nongnu.org
Subject: [Qemu-devel] Re: [PATCH 04/19] Remove double error message for -device option parsing
Date: Thu, 10 Sep 2009 19:10:56 +0100 [thread overview]
Message-ID: <1252606256.3403.45.camel@blaa> (raw)
In-Reply-To: <m38wgmhin3.fsf@neno.mitica>
On Thu, 2009-09-10 at 18:25 +0200, Juan Quintela wrote:
> Mark McLoughlin <markmc@redhat.com> wrote:
> > qemu_opts_parse() gives a suitable error message in all failure cases
> > so we can remove the error message from the caller.
> >
> > Signed-off-by: Mark McLoughlin <markmc@redhat.com>
> > ---
> > vl.c | 5 +----
> > 1 files changed, 1 insertions(+), 4 deletions(-)
> >
> > diff --git a/vl.c b/vl.c
> > index 6da83a6..ed07d50 100644
> > --- a/vl.c
> > +++ b/vl.c
> > @@ -5251,11 +5251,8 @@ int main(int argc, char **argv, char **envp)
> > add_device_config(DEV_USB, optarg);
> > break;
> > case QEMU_OPTION_device:
> > - opts = qemu_opts_parse(&qemu_device_opts, optarg, "driver");
> > - if (!opts) {
> > - fprintf(stderr, "parse error: %s\n", optarg);
> > + if (!qemu_opts_parse(&qemu_device_opts, optarg, "driver"))
> > exit(1);
> > - }
> > break;
> > case QEMU_OPTION_smp:
> > smp_parse(optarg);
>
> This was the only use of opts variable, you have to remove it.
I did, but then re-added it when I re-based to Anthony's queue. The
chardev stuff uses it.
> And you shouldn't remove the braces (read the qemu coding style).
Yeah, I try not to, it was a reflex, I guess.
(It's also not helped that a lot of the existing code doesn't follow
this aspect of the coding style)
Cheers,
Mark.
next prev parent reply other threads:[~2009-09-10 18:12 UTC|newest]
Thread overview: 34+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-09-10 15:18 [Qemu-devel] [PATCH 00/19] Port -net to QemuOpts Mark McLoughlin
2009-09-10 15:18 ` [Qemu-devel] [PATCH 01/19] Suppress more more kraxelisms Mark McLoughlin
2009-09-10 18:02 ` Michael S. Tsirkin
2009-09-10 15:18 ` [Qemu-devel] [PATCH 02/19] Remove bogus error message from qemu_opts_set() Mark McLoughlin
2009-09-10 18:01 ` Michael S. Tsirkin
2009-09-10 15:18 ` [Qemu-devel] [PATCH 03/19] Remove double error message in qemu_option_set() Mark McLoughlin
2009-09-10 18:03 ` Michael S. Tsirkin
2009-09-10 18:36 ` braces [was Re: [Qemu-devel] [PATCH 03/19] Remove double error message in qemu_option_set()] Mark McLoughlin
2009-09-11 5:01 ` Michael S. Tsirkin
2009-09-11 5:50 ` Amit Shah
2009-09-10 15:18 ` [Qemu-devel] [PATCH 04/19] Remove double error message for -device option parsing Mark McLoughlin
[not found] ` <m38wgmhin3.fsf@neno.mitica>
2009-09-10 18:10 ` Mark McLoughlin [this message]
2009-09-10 15:18 ` [Qemu-devel] [PATCH 05/19] Make qemu_opts_parse() handle empty strings Mark McLoughlin
2009-09-10 15:18 ` [Qemu-devel] [PATCH 06/19] Add qemu_opts_validate() for post parsing validation Mark McLoughlin
2009-09-11 7:47 ` Gerd Hoffmann
2009-09-11 12:38 ` Mark McLoughlin
2009-09-11 13:51 ` Gerd Hoffmann
2009-09-10 15:18 ` [Qemu-devel] [PATCH 07/19] Never overwrite a QemuOpt Mark McLoughlin
2009-09-11 7:51 ` Gerd Hoffmann
2009-09-10 15:18 ` [Qemu-devel] [PATCH 08/19] Add qemu_net_opts Mark McLoughlin
2009-09-10 15:18 ` [Qemu-devel] [PATCH 09/19] Port -net none and -net nic to QemuOpts Mark McLoughlin
2009-09-11 7:57 ` Gerd Hoffmann
2009-09-11 12:39 ` Mark McLoughlin
2009-09-10 15:18 ` [Qemu-devel] [PATCH 10/19] Port -net user " Mark McLoughlin
2009-09-10 15:18 ` [Qemu-devel] [PATCH 11/19] Port -net tap " Mark McLoughlin
2009-09-10 15:18 ` [Qemu-devel] [PATCH 12/19] Port -net socket " Mark McLoughlin
2009-09-10 15:18 ` [Qemu-devel] [PATCH 13/19] Port -net vde " Mark McLoughlin
2009-09-10 15:18 ` [Qemu-devel] [PATCH 14/19] Port -net dump " Mark McLoughlin
2009-09-10 15:18 ` [Qemu-devel] [PATCH 15/19] Clean up legacy code in net_client_init() Mark McLoughlin
2009-09-10 15:18 ` [Qemu-devel] [PATCH 16/19] Port host_net_add monitor command to QemuOpts Mark McLoughlin
2009-09-10 15:18 ` [Qemu-devel] [PATCH 17/19] Port usb net " Mark McLoughlin
2009-09-10 15:19 ` [Qemu-devel] [PATCH 18/19] Port PCI NIC hotplug " Mark McLoughlin
2009-09-10 15:19 ` [Qemu-devel] [PATCH 19/19] Final net cleanup after conversion " Mark McLoughlin
2009-09-18 12:08 ` [Qemu-devel] [PATCH 00/19] Port -net " Mark McLoughlin
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=1252606256.3403.45.camel@blaa \
--to=markmc@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=quintela@trasno.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).