X-Git-Url: http://git.ozlabs.org/?p=petitboot;a=blobdiff_plain;f=discover%2Fyaboot-parser.c;h=4dd1ea5be9648214f7a14b64b837839723fb9e60;hp=41f43eb614186926ad38dd8bebe1f3b2f6f958d8;hb=a1fb38f17bfa60aac89d0dd21dd8ccc739d794bf;hpb=66bf929fa97fabb70198455f9eec2e9ccf0661fa diff --git a/discover/yaboot-parser.c b/discover/yaboot-parser.c index 41f43eb..4dd1ea5 100644 --- a/discover/yaboot-parser.c +++ b/discover/yaboot-parser.c @@ -16,7 +16,6 @@ struct yaboot_state { int globals_done; - const char *const *known_names; /* current option data */ struct discover_boot_option *opt; @@ -194,14 +193,10 @@ static void yaboot_process_pair(struct conf_context *conf, const char *name, if (!state->globals_done && conf_set_global_option(conf, name, value)) return; - if (!conf_param_in_list(state->known_names, name)) - return; - - state->globals_done = 1; - /* image */ - if (streq(name, "image")) { + /* an image section finishes our global defintions */ + state->globals_done = 1; /* First finish any previous image. */ if (opt) @@ -245,7 +240,7 @@ static void yaboot_process_pair(struct conf_context *conf, const char *name, /* all other processing requires an image */ if (!opt) { - pb_log("%s: unknown name: %s\n", __func__, name); + pb_debug("%s: unknown name: %s\n", __func__, name); return; } @@ -311,7 +306,7 @@ static void yaboot_process_pair(struct conf_context *conf, const char *name, return; } - pb_log("%s: unknown name: %s\n", __func__, name); + pb_debug("%s: unknown name: %s\n", __func__, name); } static struct conf_global_option yaboot_global_options[] = { @@ -341,24 +336,6 @@ static const char *const yaboot_conf_files[] = { NULL }; -static const char *yaboot_known_names[] = { - "append", - "image", - "image[64bit]", /* SUSE extension */ - "image[32bit]", /* SUSE extension */ - "initrd", - "initrd-size", - "label", - "literal", - "ramdisk", - "read-only", - "read-write", - "root", - "device", - "partition", - NULL -}; - static int yaboot_parse(struct discover_context *dc) { const char * const *filename; @@ -384,8 +361,6 @@ static int yaboot_parse(struct discover_context *dc) conf->finish = yaboot_finish; conf->parser_info = state = talloc_zero(conf, struct yaboot_state); - state->known_names = yaboot_known_names; - state->opt = NULL; for (filename = yaboot_conf_files; *filename; filename++) {