]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
virsh: allow empty targets in cmdDomFSInfo
authorJán Tomko <jtomko@redhat.com>
Tue, 12 Feb 2019 08:09:01 +0000 (09:09 +0100)
committerJán Tomko <jtomko@redhat.com>
Tue, 12 Feb 2019 12:50:10 +0000 (13:50 +0100)
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@redhat.com>
tools/virsh-domain.c

index 6124126576016b23e125ef700a43f744a3cae2ed..0ea65e8994420a3070e2943b5bab8cf541b2700d 100644 (file)
@@ -13978,7 +13978,7 @@ cmdDomFSInfo(vshControl *ctl, const vshCmd *cmd)
                                   info[i]->mountpoint,
                                   info[i]->name,
                                   info[i]->fstype,
-                                  targets,
+                                  targets ? targets : "",
                                   NULL) < 0)
                 goto cleanup;
         }