From 92dce3e2febc752434c08574cbb394545c7fef47 Mon Sep 17 00:00:00 2001 From: Adrian Reber Date: Thu, 8 Jul 2021 15:24:31 +0000 Subject: 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 --- pkg/criu/criu.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'pkg/criu') 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 } -- cgit v1.2.3-54-g00ecf