diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2019-02-01 03:23:34 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-02-01 03:23:34 +0100 |
commit | f0d64a9e3ed2e4d0eed65d1cb96b427d222f24b5 (patch) | |
tree | 85c9865589f4def4a37ceceeeacff3019201dc6f /pkg/varlinkapi | |
parent | e133834f6d60310ecd6cbd67b58f891f29b25e10 (diff) | |
parent | 9e22fbf6796c58b9fc3716722c23550eb50a6bd1 (diff) | |
download | podman-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.go | 4 |
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) |