summaryrefslogtreecommitdiff
path: root/libpod/container_inspect.go
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2019-06-18 23:10:06 +0200
committerGitHub <noreply@github.com>2019-06-18 23:10:06 +0200
commit9dd9705c2fc0629c575d956d7ab9133105049184 (patch)
tree4a808f7b5ca658127c8edbf83354f87237c25c2b /libpod/container_inspect.go
parent3cabd81045c25172786a133c538fe97b5ab83c14 (diff)
parentdc4d20b5739d953444a55b1f731c5ec4cc3231f5 (diff)
downloadpodman-9dd9705c2fc0629c575d956d7ab9133105049184.tar.gz
podman-9dd9705c2fc0629c575d956d7ab9133105049184.tar.bz2
podman-9dd9705c2fc0629c575d956d7ab9133105049184.zip
Merge pull request #3358 from mheon/use_disk_spec
Swap to using the on-disk spec for inspect mounts
Diffstat (limited to 'libpod/container_inspect.go')
-rw-r--r--libpod/container_inspect.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/libpod/container_inspect.go b/libpod/container_inspect.go
index 8b3a18e41..752823634 100644
--- a/libpod/container_inspect.go
+++ b/libpod/container_inspect.go
@@ -241,7 +241,7 @@ func (c *Container) getContainerInspectData(size bool, driverData *driver.Data)
}
}
- mounts, err := c.getInspectMounts()
+ mounts, err := c.getInspectMounts(spec)
if err != nil {
return nil, err
}
@@ -357,7 +357,7 @@ func (c *Container) getContainerInspectData(size bool, driverData *driver.Data)
// Get inspect-formatted mounts list.
// Only includes user-specified mounts. Only includes bind mounts and named
// volumes, not tmpfs volumes.
-func (c *Container) getInspectMounts() ([]*InspectMount, error) {
+func (c *Container) getInspectMounts(ctrSpec *spec.Spec) ([]*InspectMount, error) {
inspectMounts := []*InspectMount{}
// No mounts, return early
@@ -374,7 +374,7 @@ func (c *Container) getInspectMounts() ([]*InspectMount, error) {
for _, namedVol := range c.config.NamedVolumes {
namedVolumes[namedVol.Dest] = namedVol
}
- for _, mount := range c.config.Spec.Mounts {
+ for _, mount := range ctrSpec.Mounts {
mounts[mount.Destination] = mount
}