[libvirt] [PATCH] storage: Add comment to picking return value of qemu-img
Jiri Denemark
jdenemar at redhat.com
Tue May 24 08:20:00 UTC 2011
On Tue, May 24, 2011 at 09:10:52 +0200, Michal Privoznik wrote:
> Commit d7b2679253504d6defa9fc7159b572cfd6a25a95 introduced
> a return value picking of qemu-img on '-h', but without any comment.
> ---
> src/storage/storage_backend.c | 3 +++
> 1 files changed, 3 insertions(+), 0 deletions(-)
>
> diff --git a/src/storage/storage_backend.c b/src/storage/storage_backend.c
> index c8e19c8..b423d11 100644
> --- a/src/storage/storage_backend.c
> +++ b/src/storage/storage_backend.c
> @@ -628,6 +628,9 @@ static int virStorageBackendQEMUImgBackingFormat(const char *qemuimg)
> virCommandSetOutputBuffer(cmd, &help);
> virCommandClearCaps(cmd);
>
> + /* qemuimg doesn't return zero exit status on -h,
> + * therefore we need to provide pointer for storing
> + * exit status, although we don't parse it any later */
> if (virCommandRun(cmd, &exitstatus) < 0)
> goto cleanup;
ACK
Jirka
More information about the libvir-list
mailing list