summaryrefslogtreecommitdiff
path: root/pkg/varlinkapi
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2019-02-01 03:23:34 +0100
committerGitHub <noreply@github.com>2019-02-01 03:23:34 +0100
commitf0d64a9e3ed2e4d0eed65d1cb96b427d222f24b5 (patch)
tree85c9865589f4def4a37ceceeeacff3019201dc6f /pkg/varlinkapi
parente133834f6d60310ecd6cbd67b58f891f29b25e10 (diff)
parent9e22fbf6796c58b9fc3716722c23550eb50a6bd1 (diff)
downloadpodman-f0d64a9e3ed2e4d0eed65d1cb96b427d222f24b5.tar.gz
podman-f0d64a9e3ed2e4d0eed65d1cb96b427d222f24b5.tar.bz2
podman-f0d64a9e3ed2e4d0eed65d1cb96b427d222f24b5.zip
Merge pull request #2236 from baude/listcontainermountsmap
Alter varlink API for ListContainerMounts to return a map
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)