util: move kernel version functions to pkg/util/kernel

Signed-off-by: Niels de Vos <ndevos@ibm.com>
This commit is contained in:
Niels de Vos
2025-03-03 18:33:55 +01:00
committed by mergify[bot]
parent 542ed3de63
commit 15da101b1b
12 changed files with 322 additions and 266 deletions

View File

@ -23,6 +23,8 @@ import (
"runtime"
"time"
"github.com/ceph/ceph-csi/pkg/util/kernel"
"github.com/ceph/ceph-csi/internal/cephfs"
"github.com/ceph/ceph-csi/internal/controller"
"github.com/ceph/ceph-csi/internal/controller/persistentvolume"
@ -191,7 +193,7 @@ func printVersion() {
fmt.Println("Go Version:", runtime.Version())
fmt.Println("Compiler:", runtime.Compiler)
fmt.Printf("Platform: %s/%s\n", runtime.GOOS, runtime.GOARCH)
if kv, err := util.GetKernelVersion(); err == nil {
if kv, err := kernel.GetKernelVersion(); err == nil {
fmt.Println("Kernel:", kv)
}
}