From: Ján Tomko Date: Tue, 12 Feb 2019 08:09:01 +0000 (+0100) Subject: virsh: allow empty targets in cmdDomFSInfo X-Git-Tag: v5.1.0-rc1~150 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0f87356c51497ae72c57a8b8164108279b6971d4;p=thirdparty%2Flibvirt.git virsh: allow empty targets in cmdDomFSInfo 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 --- diff --git a/tools/virsh-domain.c b/tools/virsh-domain.c index 6124126576..0ea65e8994 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 ? targets : "", NULL) < 0) goto cleanup; }