summaryrefslogtreecommitdiff
path: root/cmd/podman
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2020-09-07 09:43:38 -0400
committerGitHub <noreply@github.com>2020-09-07 09:43:38 -0400
commitabb474054c81535d2f696601646b01e3483c2fa5 (patch)
tree01abe8b5a5d745ed8e9c859890337edda7d28af2 /cmd/podman
parent21c6aaeb857404309abe6a82e0541fd08fc615c7 (diff)
parentf6a988547be825ad78d9fe106181eafbc3ddf20c (diff)
downloadpodman-abb474054c81535d2f696601646b01e3483c2fa5.tar.gz
podman-abb474054c81535d2f696601646b01e3483c2fa5.tar.bz2
podman-abb474054c81535d2f696601646b01e3483c2fa5.zip
Merge pull request #7540 from QiWang19/system-df
Fix system df inconsistent
Diffstat (limited to 'cmd/podman')
-rw-r--r--cmd/podman/system/df.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/cmd/podman/system/df.go b/cmd/podman/system/df.go
index 03991101e..b262c8478 100644
--- a/cmd/podman/system/df.go
+++ b/cmd/podman/system/df.go
@@ -134,7 +134,7 @@ func printSummary(reports *entities.SystemDfReport, userFormat string) error {
for _, v := range reports.Volumes {
activeVolumes += v.Links
volumesSize += v.Size
- volumesReclaimable += v.Size
+ volumesReclaimable += v.ReclaimableSize
}
volumeSummary := dfSummary{
Type: "Local Volumes",
@@ -182,7 +182,7 @@ func printVerbose(reports *entities.SystemDfReport) error {
dfContainers = append(dfContainers, &dfContainer{SystemDfContainerReport: d})
}
containerHeaders := "CONTAINER ID\tIMAGE\tCOMMAND\tLOCAL VOLUMES\tSIZE\tCREATED\tSTATUS\tNAMES\n"
- containerRow := "{{.ContainerID}}\t{{.Image}}\t{{.Command}}\t{{.LocalVolumes}}\t{{.Size}}\t{{.Created}}\t{{.Status}}\t{{.Names}}\n"
+ containerRow := "{{.ContainerID}}\t{{.Image}}\t{{.Command}}\t{{.LocalVolumes}}\t{{.RWSize}}\t{{.Created}}\t{{.Status}}\t{{.Names}}\n"
format = containerHeaders + "{{range . }}" + containerRow + "{{end}}"
if err := writeTemplate(w, format, dfContainers); err != nil {
return nil
@@ -257,8 +257,8 @@ func (d *dfContainer) Command() string {
return strings.Join(d.SystemDfContainerReport.Command, " ")
}
-func (d *dfContainer) Size() string {
- return units.HumanSize(float64(d.SystemDfContainerReport.Size))
+func (d *dfContainer) RWSize() string {
+ return units.HumanSize(float64(d.SystemDfContainerReport.RWSize))
}
func (d *dfContainer) Created() string {