[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH for-2.10 1/3] qemu-img/convert: Always set ret <
From: |
Eric Blake |
Subject: |
Re: [Qemu-devel] [PATCH for-2.10 1/3] qemu-img/convert: Always set ret < 0 on error |
Date: |
Thu, 13 Apr 2017 16:10:55 -0500 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 |
On 04/13/2017 03:33 PM, Max Reitz wrote:
> Otherwise the qemu-img process will exit with EXIT_SUCCESS instead of
> EXIT_FAILURE.
>
> Cc: qemu-stable <address@hidden>
> Signed-off-by: Max Reitz <address@hidden>
> ---
> qemu-img.c | 2 ++
> 1 file changed, 2 insertions(+)
Reviewed-by: Eric Blake <address@hidden>
>
> diff --git a/qemu-img.c b/qemu-img.c
> index 37c2894678..f2809e1ab4 100644
> --- a/qemu-img.c
> +++ b/qemu-img.c
> @@ -2069,6 +2069,7 @@ static int img_convert(int argc, char **argv)
> opts = qemu_opts_parse_noisily(&qemu_object_opts,
> optarg, true);
> if (!opts) {
> + ret = -1;
> goto fail_getopt;
> }
> break;
> @@ -2081,6 +2082,7 @@ static int img_convert(int argc, char **argv)
> if (qemu_opts_foreach(&qemu_object_opts,
> user_creatable_add_opts_foreach,
> NULL, NULL)) {
> + ret = -1;
> goto fail_getopt;
> }
>
>
--
Eric Blake, Principal Software Engineer
Red Hat, Inc. +1-919-301-3266
Virtualization: qemu.org | libvirt.org
signature.asc
Description: OpenPGP digital signature