diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2019-06-26 02:36:06 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-06-26 02:36:06 +0200 |
commit | c9078936dd1bf5bdb59066eb1bdd179ac58f98e1 (patch) | |
tree | a8d769074e3ba43e100341c974639166c46ca5eb /libpod/runtime_cstorage.go | |
parent | fbf5e80337c6399aa54c8ea1bc316eddb369ab0b (diff) | |
parent | dd81a44ccfa34585ef62319835c8bb421db9e334 (diff) | |
download | podman-c9078936dd1bf5bdb59066eb1bdd179ac58f98e1.tar.gz podman-c9078936dd1bf5bdb59066eb1bdd179ac58f98e1.tar.bz2 podman-c9078936dd1bf5bdb59066eb1bdd179ac58f98e1.zip |
Merge pull request #3419 from baude/removelibpodfrommainphase1
remove libpod from main
Diffstat (limited to 'libpod/runtime_cstorage.go')
-rw-r--r-- | libpod/runtime_cstorage.go | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/libpod/runtime_cstorage.go b/libpod/runtime_cstorage.go index 569f63322..586db5a1e 100644 --- a/libpod/runtime_cstorage.go +++ b/libpod/runtime_cstorage.go @@ -1,6 +1,7 @@ package libpod import ( + "github.com/containers/libpod/libpod/define" "github.com/containers/storage" "github.com/pkg/errors" "github.com/sirupsen/logrus" @@ -56,7 +57,7 @@ func (r *Runtime) RemoveStorageContainer(idOrName string, force bool) error { targetID, err := r.store.Lookup(idOrName) if err != nil { if err == storage.ErrLayerUnknown { - return errors.Wrapf(ErrNoSuchCtr, "no container with ID or name %q found", idOrName) + return errors.Wrapf(define.ErrNoSuchCtr, "no container with ID or name %q found", idOrName) } return errors.Wrapf(err, "error looking up container %q", idOrName) } @@ -66,7 +67,7 @@ func (r *Runtime) RemoveStorageContainer(idOrName string, force bool) error { ctr, err := r.store.Container(targetID) if err != nil { if err == storage.ErrContainerUnknown { - return errors.Wrapf(ErrNoSuchCtr, "%q does not refer to a container", idOrName) + return errors.Wrapf(define.ErrNoSuchCtr, "%q does not refer to a container", idOrName) } return errors.Wrapf(err, "error retrieving container %q", idOrName) } @@ -77,7 +78,7 @@ func (r *Runtime) RemoveStorageContainer(idOrName string, force bool) error { return err } if exists { - return errors.Wrapf(ErrCtrExists, "refusing to remove %q as it exists in libpod as container %s", idOrName, ctr.ID) + return errors.Wrapf(define.ErrCtrExists, "refusing to remove %q as it exists in libpod as container %s", idOrName, ctr.ID) } if !force { @@ -92,7 +93,7 @@ func (r *Runtime) RemoveStorageContainer(idOrName string, force bool) error { return errors.Wrapf(err, "error looking up container %q mounts", idOrName) } if timesMounted > 0 { - return errors.Wrapf(ErrCtrStateInvalid, "container %q is mounted and cannot be removed without using force", idOrName) + return errors.Wrapf(define.ErrCtrStateInvalid, "container %q is mounted and cannot be removed without using force", idOrName) } } else { if _, err := r.store.Unmount(ctr.ID, true); err != nil { |