From f08fffa3061fd12763674138719f69290e143e3d Mon Sep 17 00:00:00 2001 From: Matthew Heon Date: Fri, 13 Jul 2018 11:25:05 -0400 Subject: Don't print rootfs and rw sizes if they're empty We're printing them unconditionally now, even if --size is not passed, which is confusing (you see a pair of 0s for container size, when it is clearly not 0). This may introduce bugs related to containers with an rwsize of 0 (freshly created from an image) and --size specified, but is definitely better than what we have now. Signed-off-by: Matthew Heon --- cmd/podman/ps.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'cmd') diff --git a/cmd/podman/ps.go b/cmd/podman/ps.go index b659a91a0..f2ea3939b 100644 --- a/cmd/podman/ps.go +++ b/cmd/podman/ps.go @@ -63,8 +63,8 @@ type psJSONParams struct { Status string `json:"status"` PID int `json:"PID"` Ports []ocicni.PortMapping `json:"ports"` - RootFsSize int64 `json:"rootFsSize"` - RWSize int64 `json:"rwSize"` + RootFsSize int64 `json:"rootFsSize,omitempty"` + RWSize int64 `json:"rwSize,omitempty"` Names string `json:"names"` Labels fields.Set `json:"labels"` Mounts []string `json:"mounts"` -- cgit v1.2.3-54-g00ecf