summaryrefslogtreecommitdiff
path: root/libpod/util.go
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2019-06-26 02:36:06 +0200
committerGitHub <noreply@github.com>2019-06-26 02:36:06 +0200
commitc9078936dd1bf5bdb59066eb1bdd179ac58f98e1 (patch)
treea8d769074e3ba43e100341c974639166c46ca5eb /libpod/util.go
parentfbf5e80337c6399aa54c8ea1bc316eddb369ab0b (diff)
parentdd81a44ccfa34585ef62319835c8bb421db9e334 (diff)
downloadpodman-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/util.go')
-rw-r--r--libpod/util.go9
1 files changed, 5 insertions, 4 deletions
diff --git a/libpod/util.go b/libpod/util.go
index 3a15f9e39..7b3a03785 100644
--- a/libpod/util.go
+++ b/libpod/util.go
@@ -11,6 +11,7 @@ import (
"github.com/containers/image/signature"
"github.com/containers/image/types"
+ "github.com/containers/libpod/libpod/define"
"github.com/fsnotify/fsnotify"
spec "github.com/opencontainers/runtime-spec/specs-go"
"github.com/pkg/errors"
@@ -126,7 +127,7 @@ func WaitForFile(path string, chWait chan error, timeout time.Duration) (bool, e
return false, errors.Wrapf(err, "checking file %s", path)
}
case <-timeoutChan:
- return false, errors.Wrapf(ErrInternal, "timed out waiting for file %s", path)
+ return false, errors.Wrapf(define.ErrInternal, "timed out waiting for file %s", path)
}
}
}
@@ -156,15 +157,15 @@ func sortMounts(m []spec.Mount) []spec.Mount {
func validPodNSOption(p *Pod, ctrPod string) error {
if p == nil {
- return errors.Wrapf(ErrInvalidArg, "pod passed in was nil. Container may not be associated with a pod")
+ return errors.Wrapf(define.ErrInvalidArg, "pod passed in was nil. Container may not be associated with a pod")
}
if ctrPod == "" {
- return errors.Wrapf(ErrInvalidArg, "container is not a member of any pod")
+ return errors.Wrapf(define.ErrInvalidArg, "container is not a member of any pod")
}
if ctrPod != p.ID() {
- return errors.Wrapf(ErrInvalidArg, "pod passed in is not the pod the container is associated with")
+ return errors.Wrapf(define.ErrInvalidArg, "pod passed in is not the pod the container is associated with")
}
return nil
}