[libvirt] [PATCH 9/9] virsh: allow empty targets in cmdDomFSInfo

Ján Tomko jtomko at redhat.com
Tue Feb 12 09:21:27 UTC 2019


Ever since the introduction of the guest-get-fsinfo command
in QEMU commit 46d4c572 qga/qapi-schema.json says that
the 'disks' array can possibly be empty. For example when getting
the target list is unsupported:
https://bugzilla.redhat.com/show_bug.cgi?id=1567041

Pass an empty string instead of NULL to vshTableRowAppend to prevent
a mismatched column number.

Signed-off-by: Ján Tomko <jtomko at redhat.com>
---
 tools/virsh-domain.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/virsh-domain.c b/tools/virsh-domain.c
index 6124126576..686fea8dd1 100644
--- a/tools/virsh-domain.c
+++ b/tools/virsh-domain.c
@@ -13978,7 +13978,7 @@ cmdDomFSInfo(vshControl *ctl, const vshCmd *cmd)
                                   info[i]->mountpoint,
                                   info[i]->name,
                                   info[i]->fstype,
-                                  targets,
+                                  targets ? : "",
                                   NULL) < 0)
                 goto cleanup;
         }
-- 
2.19.2




More information about the libvir-list mailing list