]> git.ozlabs.org Git - petitboot/blobdiff - lib/pb-config/pb-config.c
lib/pb-config: Initialise DNS server info
[petitboot] / lib / pb-config / pb-config.c
index 315d9905659369ea8224f4ef8318de459138786e..e43ddf885bfdee497df6757cf0e6f56b71ffb584 100644 (file)
@@ -13,8 +13,11 @@ static struct config_storage *storage;
 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.dns_servers = NULL;
+       config->network.n_dns_servers = 0;
 }
 
 static void dump_config(struct config *config)
@@ -23,8 +26,11 @@ static void dump_config(struct config *config)
 
        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");