diff options
| author | Taras Madan <tarasmadan@google.com> | 2025-03-27 10:34:07 +0100 |
|---|---|---|
| committer | Taras Madan <tarasmadan@google.com> | 2025-03-27 10:07:16 +0000 |
| commit | c66ac62e1284de84775ccf0edf94f224db8b4509 (patch) | |
| tree | 885bf4ba80bcd8b722ea76c2dd530a48b380c985 /pkg/mgrconfig/load.go | |
| parent | b181c36d588da8d6007a23c0ad7305893758cec5 (diff) | |
pkg: use kernelDir instead of 3 parameters
It allows to reduce parameters count for some functions.
Diffstat (limited to 'pkg/mgrconfig/load.go')
| -rw-r--r-- | pkg/mgrconfig/load.go | 14 |
1 files changed, 14 insertions, 0 deletions
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 |
