Skip to content

Commit

Permalink
helpers/kernel_config: AddCustomKernelConfigs prototype change
Browse files Browse the repository at this point in the history
Make AddCustomKernelConfigs function to add a KernelConfigOption one by
one when being iterated (instead of accepting a map). This makes usage
simpler.
  • Loading branch information
rafaeldtinoco authored and Rafael David Tinoco committed Sep 3, 2021
1 parent dc406ff commit efc3f40
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions helpers/kernel_config.go
Original file line number Diff line number Diff line change
Expand Up @@ -232,12 +232,10 @@ func (k *KernelConfig) GetKernelConfigFilePath() string {
}

// AddCustomKernelConfigs allows user to extend list of possible existing kconfigs to be parsed from kConfigFilePath
func (k *KernelConfig) AddCustomKernelConfigs(values map[KernelConfigOption]string) error {
for key, value := range values {
// extend initial list of kconfig options: add other possible existing ones
KernelConfigKeyIDToString[key] = value
KernelConfigKeyStringToID[value] = key
}
func (k *KernelConfig) AddCustomKernelConfigs(key KernelConfigOption, value string) error {
// extend initial list of kconfig options: add other possible existing ones
KernelConfigKeyIDToString[key] = value
KernelConfigKeyStringToID[value] = key

return k.initKernelConfig(k.kConfigFilePath)
}
Expand Down

0 comments on commit efc3f40

Please sign in to comment.