src/internal/syscall/unix/kernel_version_ge.go
raw| 1 | // Copyright 2025 The Go Authors. All rights reserved. |
| 2 | // Use of this source code is governed by a BSD-style |
| 3 | // license that can be found in the LICENSE file. |
| 4 | |
| 5 | package unix |
| 6 | |
| 7 | // KernelVersionGE checks if the running kernel version |
| 8 | // is greater than or equal to the provided version. |
| 9 | func KernelVersionGE(x, y int) bool { |
| 10 | xx, yy := KernelVersion() |
| 11 | |
| 12 | return xx > x || (xx == x && yy >= y) |
| 13 | } |