X-Git-Url: http://git.ozlabs.org/?p=petitboot;a=blobdiff_plain;f=discover%2Fkboot-parser.c;h=29324cb224f3ac7ad454131b55803b4f75e796b1;hp=7c7cb5d0aa08f645c81ac12f0d441f44672c9ce5;hb=59caf989e5e20f4a1238f23e512a586d5ba67de1;hpb=4b77f0c4b55ff443ea06854cd12098ffce233c8a diff --git a/discover/kboot-parser.c b/discover/kboot-parser.c index 7c7cb5d..29324cb 100644 --- a/discover/kboot-parser.c +++ b/discover/kboot-parser.c @@ -21,6 +21,11 @@ static void kboot_process_pair(struct conf_context *conf, const char *name, const char *root; struct boot_option *opt; + /* ignore 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);