conf->dc = dc;
conf->global_options = kboot_global_options,
+ conf_init_global_options(conf);
conf->conf_files = kboot_conf_files,
conf->process_pair = kboot_process_pair;
conf->parser_info = (void *)kboot_ignored_names,
return 0;
}
+/**
+ * conf_init_global_options - Zero the global option table.
+ */
+
+void conf_init_global_options(struct conf_context *conf)
+{
+ int i;
+
+ for (i = 0; conf->global_options[i].name; i++)
+ conf->global_options[i].value = NULL;
+}
+
/**
* conf_set_global_option - Set a value in the global option table.
*
if (streq(name, conf->global_options[i].name)) {
conf->global_options[i].value
= talloc_strdup(conf, value);
- pb_log("%s: %s:%s\n", __func__, name, value);
+ pb_log("%s: @%s@%s@\n", __func__, name, value);
return 1;
}
}
int i;
for (i = 0; conf->global_options[i].name ;i++)
- if (streq(name, conf->global_options[i].name))
+ if (streq(name, conf->global_options[i].name)) {
+ pb_log("%s: @%s@%s@\n", __func__, name,
+ conf->global_options[i].value);
return conf->global_options[i].value;
+ }
assert(0 && "unknown global name");
return NULL;
int conf_parse(struct conf_context *conf);
char *conf_get_param_pair(char *str, char **name_out, char **value_out,
char terminator);
+void conf_init_global_options(struct conf_context *conf);
const char *conf_get_global_option(struct conf_context *conf,
const char *name);
int conf_set_global_option(struct conf_context *conf, const char *name,
conf->dc = dc;
conf->global_options = yaboot_global_options,
+ conf_init_global_options(conf);
conf->conf_files = yaboot_conf_files,
conf->process_pair = yaboot_process_pair;
conf->finish = yaboot_finish;