summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAhmad Fatoum <a.fatoum@pengutronix.de>2024-03-04 19:58:51 +0100
committerSascha Hauer <s.hauer@pengutronix.de>2024-03-05 16:28:04 +0100
commit1d06756875f06ccbc9d201b7c896cde660df86a2 (patch)
treec23d2b76adf2fa4dd2fcda544d72227dc5440751
parent225004aad39784122466e3c8ae0c11d3337347a2 (diff)
downloadbarebox-1d06756875f0.tar.gz
barebox-1d06756875f0.tar.xz
boot: print error code when booting fails
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@pengutronix.de> Link: https://lore.barebox.org/20240304190038.3486881-7-a.fatoum@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
-rw-r--r--common/boot.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/common/boot.c b/common/boot.c
index dd9e26afc7..28bb459883 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;
}