[PATCH v2 006/113] boot: print error code when booting fails
Ahmad Fatoum
a.fatoum at pengutronix.de
Mon Mar 4 10:58:51 PST 2024
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.fatoum at 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
More information about the barebox
mailing list