Depending on how boot_entry() is called, the actual error code may be
never printed anywhere for user inspection. Improve user experience by
always printing it along with the failure message.

Signed-off-by: Ahmad Fatoum <a.fat...@pengutronix.de>
---
 common/boot.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/common/boot.c b/common/boot.c
index dd9e26afc769..28bb459883cf 100644
--- a/common/boot.c
+++ b/common/boot.c
@@ -152,7 +152,7 @@ int boot_entry(struct bootentry *be, int verbose, int 
dryrun)
 
        ret = be->boot(be, verbose, dryrun);
        if (ret && ret != -ENOMEDIUM)
-               pr_err("Booting entry '%s' failed\n", be->title);
+               pr_err("Booting entry '%s' failed: %pe\n", be->title, 
ERR_PTR(ret));
 
        return ret;
 }
-- 
2.39.2


Reply via email to