summaryrefslogtreecommitdiff
path: root/cmd
diff options
context:
space:
mode:
authorMatthew Heon <matthew.heon@gmail.com>2018-07-20 12:31:32 -0400
committerGitHub <noreply@github.com>2018-07-20 12:31:32 -0400
commit7944bca4681893971ad6bda4ade4e1b3470b9559 (patch)
treea829606b854c78edccd041f6d911580c24b5356e /cmd
parentd433e5612409f9e2207b11b017b1101631a7971b (diff)
parent85db3f09bff68efb0a8509f7470b61604aefb447 (diff)
downloadpodman-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 'cmd')
-rw-r--r--cmd/podman/umount.go13
1 files changed, 2 insertions, 11 deletions
diff --git a/cmd/podman/umount.go b/cmd/podman/umount.go
index 0fd7ff144..1a2cf22c6 100644
--- a/cmd/podman/umount.go
+++ b/cmd/podman/umount.go
@@ -58,7 +58,7 @@ func umountCmd(c *cli.Context) error {
continue
}
- if err = unmountContainer(ctr); err != nil {
+ if err = ctr.Unmount(); err != nil {
if lastError != nil {
logrus.Error(lastError)
}
@@ -78,7 +78,7 @@ func umountCmd(c *cli.Context) error {
continue
}
- if err = unmountContainer(ctr); err != nil {
+ if err = ctr.Unmount(); err != nil {
if lastError != nil {
logrus.Error(lastError)
}
@@ -90,12 +90,3 @@ func umountCmd(c *cli.Context) error {
}
return lastError
}
-
-func unmountContainer(ctr *libpod.Container) error {
- if mounted, err := ctr.Mounted(); mounted {
- return ctr.Unmount()
- } else {
- return err
- }
- return errors.Errorf("container is not mounted")
-}