[lxc-devel] [lxd/master] lxc/list: If no snapshots, show 0

stgraber on Github lxc-bot at linuxcontainers.org
Wed Jul 17 05:15:08 UTC 2019


A non-text attachment was scrubbed...
Name: not available
Type: text/x-mailbox
Size: 354 bytes
Desc: not available
URL: <http://lists.linuxcontainers.org/pipermail/lxc-devel/attachments/20190716/dcfaa11e/attachment.bin>
-------------- next part --------------
From 2db7684fe2b814c77dc5f52424bccdce8c1be234 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?St=C3=A9phane=20Graber?= <stgraber at ubuntu.com>
Date: Wed, 17 Jul 2019 01:14:29 -0400
Subject: [PATCH] lxc/list: If no snapshots, show 0
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Signed-off-by: Stéphane Graber <stgraber at ubuntu.com>
---
 lxc/list.go | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lxc/list.go b/lxc/list.go
index 2691dae213..6c5636c466 100644
--- a/lxc/list.go
+++ b/lxc/list.go
@@ -673,7 +673,7 @@ func (c *cmdList) numberSnapshotsColumnData(cInfo api.ContainerFull) string {
 		return fmt.Sprintf("%d", len(cInfo.Snapshots))
 	}
 
-	return ""
+	return "0"
 }
 
 func (c *cmdList) PIDColumnData(cInfo api.ContainerFull) string {


More information about the lxc-devel mailing list