[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] Re: [PATCH 04/19] Remove double error message for -device o
From: |
Mark McLoughlin |
Subject: |
[Qemu-devel] Re: [PATCH 04/19] Remove double error message for -device option parsing |
Date: |
Thu, 10 Sep 2009 19:10:56 +0100 |
On Thu, 2009-09-10 at 18:25 +0200, Juan Quintela wrote:
> Mark McLoughlin <address@hidden> 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 <address@hidden>
> > ---
> > 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.
- [Qemu-devel] [PATCH 00/19] Port -net to QemuOpts, Mark McLoughlin, 2009/09/10
- [Qemu-devel] [PATCH 11/19] Port -net tap to QemuOpts, Mark McLoughlin, 2009/09/10
- [Qemu-devel] [PATCH 01/19] Suppress more more kraxelisms, Mark McLoughlin, 2009/09/10
- [Qemu-devel] [PATCH 02/19] Remove bogus error message from qemu_opts_set(), Mark McLoughlin, 2009/09/10
- [Qemu-devel] [PATCH 07/19] Never overwrite a QemuOpt, Mark McLoughlin, 2009/09/10
- [Qemu-devel] [PATCH 04/19] Remove double error message for -device option parsing, Mark McLoughlin, 2009/09/10
- Message not available
- [Qemu-devel] Re: [PATCH 04/19] Remove double error message for -device option parsing,
Mark McLoughlin <=
- [Qemu-devel] [PATCH 03/19] Remove double error message in qemu_option_set(), Mark McLoughlin, 2009/09/10
- [Qemu-devel] [PATCH 08/19] Add qemu_net_opts, Mark McLoughlin, 2009/09/10
- [Qemu-devel] [PATCH 05/19] Make qemu_opts_parse() handle empty strings, Mark McLoughlin, 2009/09/10
- [Qemu-devel] [PATCH 18/19] Port PCI NIC hotplug to QemuOpts, Mark McLoughlin, 2009/09/10
- [Qemu-devel] [PATCH 12/19] Port -net socket to QemuOpts, Mark McLoughlin, 2009/09/10
- [Qemu-devel] [PATCH 06/19] Add qemu_opts_validate() for post parsing validation, Mark McLoughlin, 2009/09/10