diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2019-06-18 23:10:06 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-06-18 23:10:06 +0200 |
commit | 9dd9705c2fc0629c575d956d7ab9133105049184 (patch) | |
tree | 4a808f7b5ca658127c8edbf83354f87237c25c2b | |
parent | 3cabd81045c25172786a133c538fe97b5ab83c14 (diff) | |
parent | dc4d20b5739d953444a55b1f731c5ec4cc3231f5 (diff) | |
download | podman-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
-rw-r--r-- | libpod/container_inspect.go | 6 |
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 } |