From d3e5c3605a66c04e809591fb4920f5d72e72a736 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A1n=20Tomko?= Date: Thu, 14 Feb 2019 14:45:12 +0100 Subject: [PATCH] virsh: fix snapshot list --parent MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The root snapshot does not have a parent. Use NULLSTR_EMPTY to pass an empty string instead of putting too few columns in the table. https://bugzilla.redhat.com/show_bug.cgi?id=1662849 Signed-off-by: Ján Tomko Reviewed-by: Eric Blake --- tools/virsh-snapshot.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tools/virsh-snapshot.c b/tools/virsh-snapshot.c index 90000ef1aa..6cadb2b0d6 100644 --- a/tools/virsh-snapshot.c +++ b/tools/virsh-snapshot.c @@ -1608,7 +1608,8 @@ cmdSnapshotList(vshControl *ctl, const vshCmd *cmd) &time_info); if (parent) { - if (vshTableRowAppend(table, snap_name, timestr, state, parent_snap, + if (vshTableRowAppend(table, snap_name, timestr, state, + NULLSTR_EMPTY(parent_snap), NULL) < 0) goto cleanup; } else {