summaryrefslogtreecommitdiffstats
path: root/discover/yaboot-parser.c
diff options
context:
space:
mode:
authorJeremy Kerr <jk@ozlabs.org>2014-01-14 11:04:54 +0800
committerJeremy Kerr <jk@ozlabs.org>2014-01-14 11:07:03 +0800
commite900b77853c4d890e3d173256451a586d6f639e7 (patch)
treed991d629743bc607973a226b3f6695890b23d4f1 /discover/yaboot-parser.c
parent5ee01bf795817cbfa9fb378b11ebd212d66e51c1 (diff)
downloadtalos-petitboot-e900b77853c4d890e3d173256451a586d6f639e7.tar.gz
talos-petitboot-e900b77853c4d890e3d173256451a586d6f639e7.zip
discover/yaboot: Remove known_names list
The known_names list only duplicates the arg matching we do in the body of the parser, and so introduces a problem when the array becomes out of sync. We drop the priority of the "unknown name" messages to pb_debug, as this isn't really imporant unless we're debugging. Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
Diffstat (limited to 'discover/yaboot-parser.c')
-rw-r--r--discover/yaboot-parser.c28
1 files changed, 2 insertions, 26 deletions
diff --git a/discover/yaboot-parser.c b/discover/yaboot-parser.c
index eaefbf0..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,9 +193,6 @@ 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;
-
/* image */
if (streq(name, "image")) {
/* an image section finishes our global defintions */
@@ -244,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;
}
@@ -310,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[] = {
@@ -340,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;
@@ -383,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++) {
OpenPOWER on IntegriCloud