From c66ac62e1284de84775ccf0edf94f224db8b4509 Mon Sep 17 00:00:00 2001 From: Taras Madan Date: Thu, 27 Mar 2025 10:34:07 +0100 Subject: pkg: use kernelDir instead of 3 parameters It allows to reduce parameters count for some functions. --- pkg/mgrconfig/load.go | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'pkg/mgrconfig') diff --git a/pkg/mgrconfig/load.go b/pkg/mgrconfig/load.go index 81ff2871a..51aaa0657 100644 --- a/pkg/mgrconfig/load.go +++ b/pkg/mgrconfig/load.go @@ -285,6 +285,20 @@ func (cfg *Config) CompleteKernelDirs() { cfg.KernelBuildSrc = osutil.Abs(cfg.KernelBuildSrc) } +type KernelDirs struct { + Src string + Obj string + BuildSrc string +} + +func (cfg *Config) KernelDirs() *KernelDirs { + return &KernelDirs{ + Src: cfg.KernelSrc, + Obj: cfg.KernelObj, + BuildSrc: cfg.KernelBuildSrc, + } +} + func (cfg *Config) checkSSHParams() error { if cfg.SSHKey == "" { return nil -- cgit mrf-deployment