[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 02/19] Remove bogus error message from qemu_opts
From: |
Michael S. Tsirkin |
Subject: |
Re: [Qemu-devel] [PATCH 02/19] Remove bogus error message from qemu_opts_set() |
Date: |
Thu, 10 Sep 2009 21:01:28 +0300 |
User-agent: |
Mutt/1.5.19 (2009-01-05) |
On Thu, Sep 10, 2009 at 04:18:44PM +0100, Mark McLoughlin wrote:
> The only way qemu_opts_create() can fail is if a QemuOpts with that id
> already exists and fail_if_exists=1. In that case, we already print
> an error which makes more sense than the one in qemu_opts_set().
>
> Signed-off-by: Mark McLoughlin <address@hidden>
> ---
> qemu-option.c | 5 +----
> 1 files changed, 1 insertions(+), 4 deletions(-)
>
> diff --git a/qemu-option.c b/qemu-option.c
> index f1a666f..4d544c7 100644
> --- a/qemu-option.c
> +++ b/qemu-option.c
> @@ -669,11 +669,8 @@ int qemu_opts_set(QemuOptsList *list, const char *id,
> QemuOpts *opts;
>
> opts = qemu_opts_create(list, id, 1);
> - if (opts == NULL) {
> - fprintf(stderr, "id \"%s\" not found for \"%s\"\n",
> - id, list->name);
> + if (opts == NULL)
> return -1;
> - }
I thought we are supposed to keep {} around?
Yes I hate this too.
> return qemu_opt_set(opts, name, value);
> }
>
> --
> 1.6.2.5
>
>
- [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
- Re: [Qemu-devel] [PATCH 02/19] Remove bogus error message from qemu_opts_set(),
Michael S. Tsirkin <=
- [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
- [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