diff options
author | Jeremy Kerr <jk@ozlabs.org> | 2013-09-23 17:34:14 +0800 |
---|---|---|
committer | Jeremy Kerr <jk@ozlabs.org> | 2013-09-23 18:36:08 +0800 |
commit | 7f1729734336f78ce227a0440c1a2957ac94fb91 (patch) | |
tree | 01b181b04a9066c2a6d6a4c01e2ef95fc21444f8 /discover/boot.c | |
parent | 748bd3f1bd8ffff60653f7a54f51cc5f63696c68 (diff) | |
download | petitboot-7f1729734336f78ce227a0440c1a2957ac94fb91.zip petitboot-7f1729734336f78ce227a0440c1a2957ac94fb91.tar.gz |
discover/boot: Add booting status message
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
Diffstat (limited to 'discover/boot.c')
-rw-r--r-- | discover/boot.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/discover/boot.c b/discover/boot.c index 6095cd8..f52a91c 100644 --- a/discover/boot.c +++ b/discover/boot.c @@ -285,18 +285,31 @@ int boot(void *ctx, struct discover_boot_option *opt, struct boot_command *cmd, unsigned int clean_image = 0; unsigned int clean_initrd = 0; unsigned int clean_dtb = 0; + const char *boot_desc; int result; image = NULL; initrd = NULL; dtb = NULL; + if (opt && opt->option->name) + boot_desc = opt->option->name; + else if (cmd && cmd->boot_image_file) + boot_desc = cmd->boot_image_file; + else + boot_desc = "(unknown)"; + + update_status(status_fn, status_arg, BOOT_STATUS_INFO, + "Booting %s.", boot_desc); + if (cmd && cmd->boot_image_file) { image = pb_url_parse(opt, cmd->boot_image_file); } else if (opt && opt->boot_image) { image = opt->boot_image->url; } else { pb_log("%s: no image specified\n", __func__); + update_status(status_fn, status_arg, BOOT_STATUS_INFO, + "Boot failed: no image specified"); return -1; } |