Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
return;
handler->default_boot_option = opt;
return;
handler->default_boot_option = opt;
- handler->sec_to_boot = DEFAULT_BOOT_TIMEOUT_SEC;
+ handler->sec_to_boot = config_get()->autoboot_timeout_sec;
pb_log("Boot option %s set as default, timeout %u sec.\n",
opt->option->id, handler->sec_to_boot);
pb_log("Boot option %s set as default, timeout %u sec.\n",
opt->option->id, handler->sec_to_boot);
-#define DEFAULT_BOOT_TIMEOUT_SEC 10
-
struct device_handler;
struct discover_device;
struct discover_server;
struct device_handler;
struct discover_device;
struct discover_server;
static void config_set_defaults(struct config *config)
{
config->autoboot_enabled = true;
static void config_set_defaults(struct config *config)
{
config->autoboot_enabled = true;
+ config->autoboot_timeout_sec = 10;
config->network.interfaces = NULL;
config->network.n_interfaces = 0;
}
config->network.interfaces = NULL;
config->network.n_interfaces = 0;
}
pb_log("configuration:\n");
pb_log("configuration:\n");
- pb_log(" autoboot: %s\n",
- config->autoboot_enabled ? "enabled" : "disabled");
+ if (config->autoboot_enabled)
+ pb_log(" autoboot: enabled, %d sec\n",
+ config->autoboot_timeout_sec);
+ else
+ pb_log(" autoboot: disabled\n");
if (config->network.n_interfaces || config->network.n_dns_servers)
pb_log(" network configuration:\n");
if (config->network.n_interfaces || config->network.n_dns_servers)
pb_log(" network configuration:\n");
struct config {
bool autoboot_enabled;
struct config {
bool autoboot_enabled;
+ int autoboot_timeout_sec;
struct network_config network;
};
struct network_config network;
};