summaryrefslogtreecommitdiff
path: root/cmd/podman
diff options
context:
space:
mode:
authorMatthew Heon <mheon@redhat.com>2018-07-13 11:25:05 -0400
committerMatthew Heon <mheon@redhat.com>2018-07-13 14:28:41 -0400
commitf08fffa3061fd12763674138719f69290e143e3d (patch)
tree955c3a43844bdbae74c573e287d1bd9fce1ea65c /cmd/podman
parent4c44185199299f44425ebd689bf3ac42e4606788 (diff)
downloadpodman-f08fffa3061fd12763674138719f69290e143e3d.tar.gz
podman-f08fffa3061fd12763674138719f69290e143e3d.tar.bz2
podman-f08fffa3061fd12763674138719f69290e143e3d.zip
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 <mheon@redhat.com>
Diffstat (limited to 'cmd/podman')
-rw-r--r--cmd/podman/ps.go4
1 files changed, 2 insertions, 2 deletions
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"`