[PATCH 006/112] boot: print error code when booting fails

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxxx>
---
 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





[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux