diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2021-10-04 15:10:36 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-10-04 15:10:36 -0400 |
commit | a866a2f159f94976277d8a3a9459724af0b0f62f (patch) | |
tree | 341b34bcd9dc87efada13a522bb21c31097fef8a /libpod/runtime_volume.go | |
parent | 2f72f17a114f4e20b56deb2c21908d1d4610919c (diff) | |
parent | 21c9dc3c406bb486c44c4a27e5b0497bab1cd40d (diff) | |
download | podman-a866a2f159f94976277d8a3a9459724af0b0f62f.tar.gz podman-a866a2f159f94976277d8a3a9459724af0b0f62f.tar.bz2 podman-a866a2f159f94976277d8a3a9459724af0b0f62f.zip |
Merge pull request #11763 from rhatdan/timeout
Add --time option for podman * rm -f flag
Diffstat (limited to 'libpod/runtime_volume.go')
-rw-r--r-- | libpod/runtime_volume.go | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/libpod/runtime_volume.go b/libpod/runtime_volume.go index 5f8f9ca1e..2b3ad10b4 100644 --- a/libpod/runtime_volume.go +++ b/libpod/runtime_volume.go @@ -21,7 +21,7 @@ type VolumeCreateOption func(*Volume) error type VolumeFilter func(*Volume) bool // RemoveVolume removes a volumes -func (r *Runtime) RemoveVolume(ctx context.Context, v *Volume, force bool) error { +func (r *Runtime) RemoveVolume(ctx context.Context, v *Volume, force bool, timeout *uint) error { r.lock.Lock() defer r.lock.Unlock() @@ -36,7 +36,7 @@ func (r *Runtime) RemoveVolume(ctx context.Context, v *Volume, force bool) error return nil } } - return r.removeVolume(ctx, v, force) + return r.removeVolume(ctx, v, force, timeout) } // GetVolume retrieves a volume given its full name. @@ -149,7 +149,8 @@ func (r *Runtime) PruneVolumes(ctx context.Context, filterFuncs []VolumeFilter) } report.Size = volSize report.Id = vol.Name() - if err := r.RemoveVolume(ctx, vol, false); err != nil { + var timeout *uint + if err := r.RemoveVolume(ctx, vol, false, timeout); err != nil { if errors.Cause(err) != define.ErrVolumeBeingUsed && errors.Cause(err) != define.ErrVolumeRemoved { report.Err = err } else { |