summaryrefslogtreecommitdiff
path: root/cmd/podman/umount.go
diff options
context:
space:
mode:
Diffstat (limited to 'cmd/podman/umount.go')
-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")
-}