[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 2/4] block-commit: speed is an optional paramete
From: |
Eric Blake |
Subject: |
Re: [Qemu-devel] [PATCH 2/4] block-commit: speed is an optional parameter |
Date: |
Mon, 07 Apr 2014 12:55:11 -0600 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.4.0 |
On 04/07/2014 11:29 AM, Max Reitz wrote:
> As speed is an optional parameter for the QMP block-commit command, it
> should be set to 0 if not given (as it is undefined if has_speed is
> false), that is, the speed should not be limited.
>
> Signed-off-by: Max Reitz <address@hidden>
> ---
> blockdev.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/blockdev.c b/blockdev.c
> index 0be4601..337c11f 100644
> --- a/blockdev.c
> +++ b/blockdev.c
> @@ -1876,6 +1876,7 @@ void qmp_block_commit(const char *device,
> */
> BlockdevOnError on_error = BLOCKDEV_ON_ERROR_REPORT;
>
> + speed = speed ? speed : 0;
Oops, branching based on the contents of an undefined variable. You
meant has_speed in the second of the three uses.
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature
[Qemu-devel] [PATCH 4/4] qemu-img: Enable progress output for commit, Max Reitz, 2014/04/07