Patchwork [07/24] petitboot: Check if yaboot.conf files are empty

login
register
mail settings
Submitter Geoff Levand
Date April 13, 2009, 1:11 a.m.
Message ID <20090413011137.032062105@am.sony.com>
Download mbox | patch
Permalink /patch/25876/
State Accepted
Headers show

Comments

Geoff Levand - April 13, 2009, 1:11 a.m.
Add a yaboot parser check to ignore empty yaboot.conf files.

Signed-off-by: Geoff Levand <geoffrey.levand@am.sony.com>
---
 discover/yaboot-parser.c |    7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

Patch

--- a/discover/yaboot-parser.c
+++ b/discover/yaboot-parser.c
@@ -24,7 +24,12 @@  static void yaboot_finish(struct conf_co
 {
 	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);