summaryrefslogtreecommitdiff
path: root/pkg/criu/criu.go
diff options
context:
space:
mode:
authorAdrian Reber <areber@redhat.com>2021-07-08 15:24:31 +0000
committerAdrian Reber <adrian@lisas.de>2021-07-27 16:10:44 +0200
commit92dce3e2febc752434c08574cbb394545c7fef47 (patch)
tree953df6e4037b3e242a4090e070b348054537788d /pkg/criu/criu.go
parentb6c279be2296ce32fbb36ba39bd948f93be9bede (diff)
downloadpodman-92dce3e2febc752434c08574cbb394545c7fef47.tar.gz
podman-92dce3e2febc752434c08574cbb394545c7fef47.tar.bz2
podman-92dce3e2febc752434c08574cbb394545c7fef47.zip
Prepare CRIU version check to work with multiple versions
The upcoming commit to support checkpointing out of Pods requires CRIU 3.16. This changes the CRIU version check to support checking for different versions. Signed-off-by: Adrian Reber <areber@redhat.com>
Diffstat (limited to 'pkg/criu/criu.go')
-rw-r--r--pkg/criu/criu.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/pkg/criu/criu.go b/pkg/criu/criu.go
index f4cce238a..763b0d2f7 100644
--- a/pkg/criu/criu.go
+++ b/pkg/criu/criu.go
@@ -9,9 +9,9 @@ const MinCriuVersion = 31100
// CheckForCriu uses CRIU's go bindings to check if the CRIU
// binary exists and if it at least the version Podman needs.
-func CheckForCriu() bool {
+func CheckForCriu(version int) bool {
c := criu.MakeCriu()
- result, err := c.IsCriuAtLeast(MinCriuVersion)
+ result, err := c.IsCriuAtLeast(version)
if err != nil {
return false
}