diff mbox

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

Message ID 20090413011137.032062105@am.sony.com
State Accepted
Headers show

Commit Message

Geoff Levand April 13, 2009, 1:11 a.m. UTC
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(-)
diff mbox

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);