diff options
author | Matthew Heon <matthew.heon@gmail.com> | 2018-07-20 12:31:32 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-07-20 12:31:32 -0400 |
commit | 7944bca4681893971ad6bda4ade4e1b3470b9559 (patch) | |
tree | a829606b854c78edccd041f6d911580c24b5356e /libpod/storage.go | |
parent | d433e5612409f9e2207b11b017b1101631a7971b (diff) | |
parent | 85db3f09bff68efb0a8509f7470b61604aefb447 (diff) | |
download | podman-7944bca4681893971ad6bda4ade4e1b3470b9559.tar.gz podman-7944bca4681893971ad6bda4ade4e1b3470b9559.tar.bz2 podman-7944bca4681893971ad6bda4ade4e1b3470b9559.zip |
Merge pull request #1104 from rhatdan/mounting
Let containers/storage keep track of mounts
Diffstat (limited to 'libpod/storage.go')
-rw-r--r-- | libpod/storage.go | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/libpod/storage.go b/libpod/storage.go index ff366edf2..76aa9efa4 100644 --- a/libpod/storage.go +++ b/libpod/storage.go @@ -248,6 +248,21 @@ func (r *storageService) UnmountContainerImage(idOrName string) (bool, error) { return mounted, nil } +func (r *storageService) MountedContainerImage(idOrName string) (int, error) { + if idOrName == "" { + return 0, ErrEmptyID + } + container, err := r.store.Container(idOrName) + if err != nil { + return 0, err + } + mounted, err := r.store.Mounted(container.ID) + if err != nil { + return 0, err + } + return mounted, nil +} + func (r *storageService) GetWorkDir(id string) (string, error) { container, err := r.store.Container(id) if err != nil { |