summaryrefslogtreecommitdiffstats
path: root/lib/pb-config/pb-config.c
diff options
context:
space:
mode:
authorGeoff Levand <geoff@infradead.org>2013-07-23 13:30:19 -0700
committerGeoff Levand <geoff@infradead.org>2013-07-23 13:49:23 -0700
commit37d865eb008f746a0b013557312c6b44c7236eb7 (patch)
tree2551788b9617030b8a058fd70f9da3129220892e /lib/pb-config/pb-config.c
parente5f5a2e91e89af08925b6dae3680fc9ef62190ff (diff)
downloadtalos-petitboot-37d865eb008f746a0b013557312c6b44c7236eb7.tar.gz
talos-petitboot-37d865eb008f746a0b013557312c6b44c7236eb7.zip
discover: Hookup --no-autoboot to config
Add new routine config_set_autoboot(), and use it to set the --no-autoboot option. Signed-off-by: Geoff Levand <geoff@infradead.org>
Diffstat (limited to 'lib/pb-config/pb-config.c')
-rw-r--r--lib/pb-config/pb-config.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/lib/pb-config/pb-config.c b/lib/pb-config/pb-config.c
index 9f7d240..6398a69 100644
--- a/lib/pb-config/pb-config.c
+++ b/lib/pb-config/pb-config.c
@@ -23,8 +23,8 @@ static void dump_config(struct config *config)
pb_log("configuration:\n");
- pb_log(" autoboot enabled: %s\n",
- config->autoboot_enabled ? "yes" : "no");
+ pb_log(" autoboot: %s\n",
+ config->autoboot_enabled ? "enabled" : "disabled");
if (config->n_network_configs > 0)
pb_log(" network configuration:\n");
@@ -74,6 +74,14 @@ const struct config *config_get(void)
return config;
}
+void config_set_autoboot(bool autoboot_enabled)
+{
+ config->autoboot_enabled = autoboot_enabled;
+
+ pb_log("set autoboot: %s\n",
+ config->autoboot_enabled ? "enabled" : "disabled");
+}
+
int config_fini(void)
{
talloc_free(config);
OpenPOWER on IntegriCloud