summaryrefslogtreecommitdiff
path: root/pkg/varlinkapi
diff options
context:
space:
mode:
authorbaude <bbaude@redhat.com>2019-01-29 15:56:18 -0600
committerbaude <bbaude@redhat.com>2019-01-29 16:47:27 -0600
commit9e22fbf6796c58b9fc3716722c23550eb50a6bd1 (patch)
tree7e82dfad08e87e26c7c1e78af5b59107519dda19 /pkg/varlinkapi
parentad5579e1d9905996612dd135467ee2ee5f62b7d3 (diff)
downloadpodman-9e22fbf6796c58b9fc3716722c23550eb50a6bd1.tar.gz
podman-9e22fbf6796c58b9fc3716722c23550eb50a6bd1.tar.bz2
podman-9e22fbf6796c58b9fc3716722c23550eb50a6bd1.zip
Alter varlink API for ListContainerMounts to return a map
We want to return a map of containermounts where the key is container id and it points to the mountpath. Issue #2215 Signed-off-by: baude <bbaude@redhat.com>
Diffstat (limited to 'pkg/varlinkapi')
-rw-r--r--pkg/varlinkapi/mount.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/pkg/varlinkapi/mount.go b/pkg/varlinkapi/mount.go
index 84e6b2709..3b4fe87e3 100644
--- a/pkg/varlinkapi/mount.go
+++ b/pkg/varlinkapi/mount.go
@@ -6,7 +6,7 @@ import (
// ListContainerMounts ...
func (i *LibpodAPI) ListContainerMounts(call iopodman.VarlinkCall) error {
- var mounts []string
+ mounts := make(map[string]string)
allContainers, err := i.Runtime.GetAllContainers()
if err != nil {
return call.ReplyErrorOccurred(err.Error())
@@ -17,7 +17,7 @@ func (i *LibpodAPI) ListContainerMounts(call iopodman.VarlinkCall) error {
return call.ReplyErrorOccurred(err.Error())
}
if mounted {
- mounts = append(mounts, mountPoint)
+ mounts[container.ID()] = mountPoint
}
}
return call.ReplyListContainerMounts(mounts)