Skip to content

Commit

Permalink
Remove unused ReloadConfigDetails
Browse files Browse the repository at this point in the history
Signed-off-by: Pavel Abramov <[email protected]>
  • Loading branch information
uncleDecart committed Nov 17, 2023
1 parent e0d76a5 commit 1328f39
Showing 1 changed file with 0 additions and 28 deletions.
28 changes: 0 additions & 28 deletions pkg/openevec/edenConfig.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,34 +26,6 @@ func isEncodingNeeded(contextKeySet string) bool {
return false
}

func ReloadConfigDetails(cfg *EdenSetupArgs) error {
viperLoaded, err := utils.LoadConfigFile(cfg.ConfigFile)
if err != nil {
return fmt.Errorf("error reading config: %w", err)
}
if viperLoaded {
cfg.Eve.QemuFirmware = viper.GetStringSlice("eve.firmware")
cfg.Eve.QemuConfigPath = utils.ResolveAbsPath(viper.GetString("eve.config-part"))
cfg.Eve.QemuDTBPath = utils.ResolveAbsPath(viper.GetString("eve.dtb-part"))
cfg.Eve.ImageFile = utils.ResolveAbsPath(viper.GetString("eve.image-file"))
cfg.Eve.HostFwd = viper.GetStringMapString("eve.hostfwd")
cfg.Eve.QemuFileToSave = utils.ResolveAbsPath(viper.GetString("eve.qemu-config"))
cfg.Eve.DevModel = viper.GetString("eve.devmodel")
cfg.Eve.Remote = viper.GetBool("eve.remote")
cfg.Eve.ModelFile = viper.GetString("eve.devmodelfile")
if cfg.Eve.ModelFile != "" {
filePath, err := filepath.Abs(cfg.Eve.ModelFile)
if err != nil {
return fmt.Errorf("cannot get absolute path for devmodelfile (%s): %w", cfg.Eve.ModelFile, err)
}
if _, err := os.Stat(filePath); err != nil {
return fmt.Errorf("cannot parse devmodelfile (%s): %w", cfg.Eve.ModelFile, err)
}
}
}
return nil
}

func ConfigAdd(cfg *EdenSetupArgs, currentContext, contextFile string, force bool) error {
var err error
if cfg.ConfigFile == "" {
Expand Down

0 comments on commit 1328f39

Please sign in to comment.