From 98703eb204923f06555605c648fc165a55214520 Mon Sep 17 00:00:00 2001 From: Daniel J Walsh Date: Sun, 8 Jul 2018 07:55:30 -0400 Subject: 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 Closes: #1114 Approved by: mheon --- libpod/container_internal.go | 4 ++-- libpod/storage.go | 12 ++++++------ 2 files changed, 8 insertions(+), 8 deletions(-) (limited to 'libpod') 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) { -- cgit v1.2.3-54-g00ecf