aboutsummaryrefslogtreecommitdiff
path: root/libpod/runtime_volume.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/runtime_volume.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/runtime_volume.go')
-rw-r--r--libpod/runtime_volume.go13
1 files changed, 7 insertions, 6 deletions
diff --git a/libpod/runtime_volume.go b/libpod/runtime_volume.go
index 68c6c107e..5c087faca 100644
--- a/libpod/runtime_volume.go
+++ b/libpod/runtime_volume.go
@@ -4,6 +4,7 @@ import (
"context"
"strings"
+ "github.com/containers/libpod/libpod/define"
"github.com/containers/libpod/libpod/events"
"github.com/pkg/errors"
"github.com/sirupsen/logrus"
@@ -26,7 +27,7 @@ func (r *Runtime) RemoveVolume(ctx context.Context, v *Volume, force bool) error
defer r.lock.Unlock()
if !r.valid {
- return ErrRuntimeStopped
+ return define.ErrRuntimeStopped
}
if !v.valid {
@@ -77,7 +78,7 @@ func (r *Runtime) GetVolume(name string) (*Volume, error) {
defer r.lock.RUnlock()
if !r.valid {
- return nil, ErrRuntimeStopped
+ return nil, define.ErrRuntimeStopped
}
vol, err := r.state.Volume(name)
@@ -103,7 +104,7 @@ func (r *Runtime) HasVolume(name string) (bool, error) {
defer r.lock.RUnlock()
if !r.valid {
- return false, ErrRuntimeStopped
+ return false, define.ErrRuntimeStopped
}
return r.state.HasVolume(name)
@@ -118,7 +119,7 @@ func (r *Runtime) Volumes(filters ...VolumeFilter) ([]*Volume, error) {
defer r.lock.RUnlock()
if !r.valid {
- return nil, ErrRuntimeStopped
+ return nil, define.ErrRuntimeStopped
}
vols, err := r.state.AllVolumes()
@@ -147,7 +148,7 @@ func (r *Runtime) GetAllVolumes() ([]*Volume, error) {
defer r.lock.RUnlock()
if !r.valid {
- return nil, ErrRuntimeStopped
+ return nil, define.ErrRuntimeStopped
}
return r.state.AllVolumes()
@@ -167,7 +168,7 @@ func (r *Runtime) PruneVolumes(ctx context.Context) ([]string, []error) {
for _, vol := range vols {
if err := r.RemoveVolume(ctx, vol, false); err != nil {
- if errors.Cause(err) != ErrVolumeBeingUsed && errors.Cause(err) != ErrVolumeRemoved {
+ if errors.Cause(err) != define.ErrVolumeBeingUsed && errors.Cause(err) != define.ErrVolumeRemoved {
pruneErrors = append(pruneErrors, err)
}
continue