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>
struct yaboot_state {
int globals_done;
struct yaboot_state {
int globals_done;
- const char *const *known_names;
/* current option data */
struct discover_boot_option *opt;
/* current option data */
struct discover_boot_option *opt;
if (!state->globals_done && conf_set_global_option(conf, name, value))
return;
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 */
/* image */
if (streq(name, "image")) {
/* an image section finishes our global defintions */
/* all other processing requires an image */
if (!opt) {
/* 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);
- 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[] = {
}
static struct conf_global_option yaboot_global_options[] = {
-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;
static int yaboot_parse(struct discover_context *dc)
{
const char * const *filename;
conf->finish = yaboot_finish;
conf->parser_info = state = talloc_zero(conf, struct yaboot_state);
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++) {
state->opt = NULL;
for (filename = yaboot_conf_files; *filename; filename++) {