diff --git a/checkpoint/checkpoint_linux.go b/checkpoint/checkpoint_linux_amd64.go similarity index 100% rename from checkpoint/checkpoint_linux.go rename to checkpoint/checkpoint_linux_amd64.go diff --git a/checkpoint/checkpoint_linux_arm.go b/checkpoint/checkpoint_linux_arm.go new file mode 100644 index 000000000..b1c5ac37a --- /dev/null +++ b/checkpoint/checkpoint_linux_arm.go @@ -0,0 +1,23 @@ +package checkpoint + +import ( + "syscall" +) + +func getKernelVersion() string { + var uts syscall.Utsname + syscall.Uname(&uts) + return cstringToString(uts.Release[:]) +} + +func cstringToString(c []uint8) string { + s := make([]byte, len(c)) + i := 0 + for ; i < len(c); i++ { + if c[i] == 0 { + break + } + s[i] = uint8(c[i]) + } + return string(s[:i]) +}