diff options
author | Geoff Levand <geoffrey.levand@am.sony.com> | 2009-04-12 15:11:43 +0000 |
---|---|---|
committer | Jeremy Kerr <jk@ozlabs.org> | 2009-06-30 15:29:10 +0800 |
commit | 0216e1b8a561fed90f0da9d7a67954d5d67458e5 (patch) | |
tree | a2a0135dd8b19cde48077790cad9466c4b696b75 /discover/yaboot-parser.c | |
parent | fa6b8cb1d5e9e586370631b879a36cdf49110504 (diff) | |
download | petitboot-0216e1b8a561fed90f0da9d7a67954d5d67458e5.zip petitboot-0216e1b8a561fed90f0da9d7a67954d5d67458e5.tar.gz |
Check if yaboot.conf files are empty
Add a yaboot parser check to ignore empty yaboot.conf files.
Signed-off-by: Geoff Levand <geoffrey.levand@am.sony.com>
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
Diffstat (limited to 'discover/yaboot-parser.c')
-rw-r--r-- | discover/yaboot-parser.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/discover/yaboot-parser.c b/discover/yaboot-parser.c index c47dee1..d9f2aff 100644 --- a/discover/yaboot-parser.c +++ b/discover/yaboot-parser.c @@ -24,7 +24,12 @@ static void yaboot_finish(struct conf_context *conf) { struct yaboot_state *state = conf->parser_info; - assert(state->desc_image); + if (!state->desc_image) { + pb_log("%s: %s: no image found\n", __func__, + conf->dc->device->id); + return; + } + assert(state->opt); assert(state->opt->name); assert(state->opt->boot_args); |