created kernel.FindKernel reduces code complexity
Signed-off-by: Christian Goll <cgoll@suse.com>
This commit is contained in:
committed by
Jonathon Anderson
parent
b192e3b5d5
commit
2ba9efa57c
@@ -37,10 +37,9 @@ func CobraRunE(cmd *cobra.Command, args []string) error {
|
||||
if len(args) > 0 {
|
||||
kernelVersion = args[0]
|
||||
} else {
|
||||
kernelVersion, err = kernel.FindKernelVersion(OptRoot)
|
||||
_, kernelVersion, err = kernel.FindKernel(OptRoot)
|
||||
if err != nil {
|
||||
wwlog.Error("could not detect kernel under %s", OptRoot)
|
||||
os.Exit(1)
|
||||
return err
|
||||
}
|
||||
}
|
||||
kernelName := kernelVersion
|
||||
|
||||
Reference in New Issue
Block a user