[libvirt] [PATCH] storage: Add comment to picking return value of qemu-img

Michal Privoznik mprivozn at redhat.com
Tue May 24 07:10:52 UTC 2011


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;
 
-- 
1.7.5.rc3




More information about the libvir-list mailing list