summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
b5ab295)
Update update_network_config and update_bootdev_config to
operate on a generic parameter name passed as an argument.
Signed-off-by: Geoff Levand <geoff@infradead.org>
Signed-off-by: Samuel Mendoza-Jonas <sam@mendozajonas.com>
}
static void update_network_config(struct platform_powerpc *platform,
}
static void update_network_config(struct platform_powerpc *platform,
+ const char *param_name, const struct config *config)
{
unsigned int i;
char *val;
{
unsigned int i;
char *val;
- update_string_config(platform, "petitboot,network", val);
+ update_string_config(platform, param_name, val);
talloc_free(val);
}
static void update_bootdev_config(struct platform_powerpc *platform,
talloc_free(val);
}
static void update_bootdev_config(struct platform_powerpc *platform,
+ const char *param_name, const struct config *config)
{
char *val = NULL, *boot_str = NULL, *tmp = NULL;
struct autoboot_option *opt;
{
char *val = NULL, *boot_str = NULL, *tmp = NULL;
struct autoboot_option *opt;
tmp = val = talloc_asprintf_append(val, "%s", boot_str);
}
tmp = val = talloc_asprintf_append(val, "%s", boot_str);
}
- update_string_config(platform, "petitboot,bootdevs", val);
+ update_string_config(platform, param_name, val);
talloc_free(tmp);
if (boot_str)
talloc_free(boot_str);
talloc_free(tmp);
if (boot_str)
talloc_free(boot_str);
val = config->https_proxy ?: "";
update_string_config(platform, "petitboot,https_proxy", val);
val = config->https_proxy ?: "";
update_string_config(platform, "petitboot,https_proxy", val);
- update_network_config(platform, config);
+ update_network_config(platform, "petitboot,network", config);
- update_bootdev_config(platform, config);
+ update_bootdev_config(platform, "petitboot,bootdevs", config);
}
static void set_ipmi_bootdev(struct config *config, enum ipmi_bootdev bootdev,
}
static void set_ipmi_bootdev(struct config *config, enum ipmi_bootdev bootdev,
if (!rc && persistent) {
/* Write this new config to NVRAM */
if (!rc && persistent) {
/* Write this new config to NVRAM */
- update_network_config(platform, config);
+ update_network_config(platform, "petitboot,network", config);
rc = write_nvram(platform);
if (rc)
pb_log("platform: Failed to save persistent interface override\n");
rc = write_nvram(platform);
if (rc)
pb_log("platform: Failed to save persistent interface override\n");