The curent iterate_parsers() and related routines will end the iteration after one parser has found a conf file, even if no boot options are found in that file. Update the routines to unconditionally iterate over all configured parsers. The Gentoo Install CD and Gentoo LiveCD both contain an empty yaboot.conf file and a valid kboot.conf file. This change allows those boot options in the kboot.conf to be found. Signed-off-by: Geoff Levand --- discover/kboot-parser.c | 2 +- discover/parser.c | 8 ++++---- discover/yaboot-parser.c | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) --- a/discover/kboot-parser.c +++ b/discover/kboot-parser.c @@ -133,7 +133,7 @@ static int kboot_parse(struct discover_c conf = talloc_zero(dc, struct conf_context); if (!conf) - return -1; + return 0; conf->dc = dc; conf->global_options = kboot_global_options, --- a/discover/parser.c +++ b/discover/parser.c @@ -13,16 +13,16 @@ extern struct parser __start_parsers[], void iterate_parsers(struct discover_context *ctx) { struct parser *parser; + unsigned int count = 0; pb_log("trying parsers for %s\n", ctx->device_path); for (parser = __start_parsers; parser < __stop_parsers; parser++) { pb_log("\ttrying parser '%s'\n", parser->name); - /* just use a dummy device path for now */ - if (parser->parse(ctx)) - return; + count += parser->parse(ctx); } - pb_log("\tno boot_options found\n"); + if (!count) + pb_log("\tno boot_options found\n"); } static int compare_parsers(const void *a, const void *b) --- a/discover/yaboot-parser.c +++ b/discover/yaboot-parser.c @@ -295,7 +295,7 @@ static int yaboot_parse(struct discover_ conf = talloc_zero(dc, struct conf_context); if (!conf) - return -1; + return 0; conf->dc = dc; conf->global_options = yaboot_global_options,