summaryrefslogtreecommitdiff
path: root/libpod
diff options
context:
space:
mode:
authorDaniel J Walsh <dwalsh@redhat.com>2018-07-08 07:55:30 -0400
committerAtomic Bot <atomic-devel@projectatomic.io>2018-07-19 18:43:32 +0000
commit98703eb204923f06555605c648fc165a55214520 (patch)
treea407bae8b3489d4f9b0f0d0f228658bbfe95a38e /libpod
parentc020db8cd21cb221cfbe36b264e0ec02999596ed (diff)
downloadpodman-98703eb204923f06555605c648fc165a55214520.tar.gz
podman-98703eb204923f06555605c648fc165a55214520.tar.bz2
podman-98703eb204923f06555605c648fc165a55214520.zip
Vendor in latest code for storage,image, buildah
vendor in containers/storage vendor in containers/image vendor in projectatomic/buildah Signed-off-by: Daniel J Walsh <dwalsh@redhat.com> Closes: #1114 Approved by: mheon
Diffstat (limited to 'libpod')
-rw-r--r--libpod/container_internal.go4
-rw-r--r--libpod/storage.go12
2 files changed, 8 insertions, 8 deletions
diff --git a/libpod/container_internal.go b/libpod/container_internal.go
index 010d01315..38099c6ac 100644
--- a/libpod/container_internal.go
+++ b/libpod/container_internal.go
@@ -415,7 +415,7 @@ func (c *Container) export(path string) error {
}
mountPoint = mount
defer func() {
- if err := c.runtime.store.Unmount(c.ID()); err != nil {
+ if _, err := c.runtime.store.Unmount(c.ID(), false); err != nil {
logrus.Errorf("error unmounting container %q: %v", c.ID(), err)
}
}()
@@ -797,7 +797,7 @@ func (c *Container) cleanupStorage() error {
}
// Also unmount storage
- if err := c.runtime.storageService.UnmountContainerImage(c.ID()); err != nil {
+ if _, err := c.runtime.storageService.UnmountContainerImage(c.ID()); err != nil {
// If the container has already been removed, warn but don't
// error
// We still want to be able to kick the container out of the
diff --git a/libpod/storage.go b/libpod/storage.go
index b969df7f3..ff366edf2 100644
--- a/libpod/storage.go
+++ b/libpod/storage.go
@@ -231,21 +231,21 @@ func (r *storageService) MountContainerImage(idOrName string) (string, error) {
return mountPoint, nil
}
-func (r *storageService) UnmountContainerImage(idOrName string) error {
+func (r *storageService) UnmountContainerImage(idOrName string) (bool, error) {
if idOrName == "" {
- return ErrEmptyID
+ return false, ErrEmptyID
}
container, err := r.store.Container(idOrName)
if err != nil {
- return err
+ return false, err
}
- err = r.store.Unmount(container.ID)
+ mounted, err := r.store.Unmount(container.ID, false)
if err != nil {
logrus.Debugf("failed to unmount container %q: %v", container.ID, err)
- return err
+ return false, err
}
logrus.Debugf("unmounted container %q", container.ID)
- return nil
+ return mounted, nil
}
func (r *storageService) GetWorkDir(id string) (string, error) {