X-Git-Url: http://git.ozlabs.org/?p=petitboot;a=blobdiff_plain;f=discover%2Fgrub2-parser.c;h=3c756c1b0f5230f120253d0d62568870459af349;hp=6ef5945b11c999fe87bfa813f821b0453d5d6477;hb=06a49ebdfc795a70b938f5aee29f3c488ef9fc21;hpb=39e06f5cfda0ed0c1eeb7a7604a3d05dda81ccf1 diff --git a/discover/grub2-parser.c b/discover/grub2-parser.c index 6ef5945..3c756c1 100644 --- a/discover/grub2-parser.c +++ b/discover/grub2-parser.c @@ -156,11 +156,10 @@ static const char *grub2_known_names[] = { NULL }; -static int grub2_parse(struct discover_context *dc) +static int grub2_parse(struct discover_context *dc, char *buf, int len) { struct conf_context *conf; struct grub2_state *state; - int rc; conf = talloc_zero(dc, struct conf_context); @@ -169,7 +168,6 @@ static int grub2_parse(struct discover_context *dc) conf->dc = dc; conf_init_global_options(conf); - conf->conf_files = grub2_conf_files, conf->get_pair = conf_get_pair_space; conf->process_pair = grub2_process_pair; conf->finish = grub2_finish; @@ -182,10 +180,10 @@ static int grub2_parse(struct discover_context *dc) state->opt = talloc_zero(conf->dc->device, struct boot_option); state->opt->boot_args = talloc_strdup(state->opt, ""); - rc = conf_parse(conf); + conf_parse_buf(conf, buf, len); talloc_free(conf); - return rc; + return 1; } struct parser __grub2_parser = {