Add new member get_pair to conf parser context
[petitboot] / discover / kboot-parser.c
index 7c7cb5d0aa08f645c81ac12f0d441f44672c9ce5..5fabc942c0da6492674fbbc8f453c4fe84b41fe2 100644 (file)
@@ -21,6 +21,11 @@ static void kboot_process_pair(struct conf_context *conf, const char *name,
        const char *root;
        struct boot_option *opt;
 
+       /* fixup for bare values */
+
+       if (!name)
+               return;
+
        if (conf_param_in_list(ignored_names, name))
                return;
 
@@ -52,7 +57,7 @@ static void kboot_process_pair(struct conf_context *conf, const char *name,
        for (pos++; pos;) {
                char *cl_name, *cl_value;
 
-               pos = conf_get_param_pair(pos, &cl_name, &cl_value, ' ');
+               pos = conf_get_pair_equal(conf, pos, &cl_name, &cl_value, ' ');
 
                if (!cl_name) {
                        args = talloc_asprintf_append(args, "%s ", cl_value);
@@ -139,6 +144,7 @@ static int kboot_parse(struct discover_context *dc)
        conf->global_options = kboot_global_options,
        conf_init_global_options(conf);
        conf->conf_files = kboot_conf_files,
+       conf->get_pair = conf_get_pair_equal;
        conf->process_pair = kboot_process_pair;
        conf->parser_info = (void *)kboot_ignored_names,
 
@@ -148,4 +154,4 @@ static int kboot_parse(struct discover_context *dc)
        return rc;
 }
 
-define_parser(kboot, 98, kboot_parse);
+define_parser(kboot, kboot_parse);