From: Khalid Ali <khaliidcaliy@gmail.com>
To: ardb@kernel.org, lukas@wunner.de, bp@alien8.de
Cc: linux-efi@vger.kernel.org, linux-kernel@vger.kernel.org,
Khalid Ali <khaliidcaliy@gmail.com>
Subject: [PATCH] efi/libstub: Print status codes on failure
Date: Sat, 21 Jun 2025 11:33:32 +0000 [thread overview]
Message-ID: <20250621113334.7789-1-khaliidcaliy@gmail.com> (raw)
From: Khalid Ali <khaliidcaliy@gmail.com>
Print status codes on errors. This makes easier to understand the reason
of failure.
Signed-off-by: Khalid Ali <khaliidcaliy@gmail.com>
---
drivers/firmware/efi/libstub/x86-stub.c | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/drivers/firmware/efi/libstub/x86-stub.c b/drivers/firmware/efi/libstub/x86-stub.c
index cafc90d4caaf..09ed1c122106 100644
--- a/drivers/firmware/efi/libstub/x86-stub.c
+++ b/drivers/firmware/efi/libstub/x86-stub.c
@@ -846,14 +846,14 @@ void __noreturn efi_stub_entry(efi_handle_t handle,
status = efi_setup_5level_paging();
if (status != EFI_SUCCESS) {
- efi_err("efi_setup_5level_paging() failed!\n");
+ efi_err("efi_setup_5level_paging() failed, status %lu\n", status);
goto fail;
}
#ifdef CONFIG_CMDLINE_BOOL
status = parse_options(CONFIG_CMDLINE);
if (status != EFI_SUCCESS) {
- efi_err("Failed to parse options\n");
+ efi_err("Failed to parse options, status %lu\n", status);
goto fail;
}
#endif
@@ -862,7 +862,7 @@ void __noreturn efi_stub_entry(efi_handle_t handle,
((u64)boot_params->ext_cmd_line_ptr << 32));
status = parse_options((char *)cmdline_paddr);
if (status != EFI_SUCCESS) {
- efi_err("Failed to parse options\n");
+ efi_err("Failed to parse options status %lu\n", status);
goto fail;
}
}
@@ -872,7 +872,7 @@ void __noreturn efi_stub_entry(efi_handle_t handle,
status = efi_decompress_kernel(&kernel_entry, boot_params);
if (status != EFI_SUCCESS) {
- efi_err("Failed to decompress kernel\n");
+ efi_err("Failed to decompress kernel, status %lu\n", status);
goto fail;
}
@@ -921,7 +921,7 @@ void __noreturn efi_stub_entry(efi_handle_t handle,
status = exit_boot(boot_params, handle);
if (status != EFI_SUCCESS) {
- efi_err("exit_boot() failed!\n");
+ efi_err("exit_boot() failed, status %lu\n", status);
goto fail;
}
@@ -935,7 +935,7 @@ void __noreturn efi_stub_entry(efi_handle_t handle,
enter_kernel(kernel_entry, boot_params);
fail:
- efi_err("efi_stub_entry() failed!\n");
+ efi_err("efi_stub_entry() failed, status %lu\n", status);
efi_exit(handle, status);
}
--
2.49.0
reply other threads:[~2025-06-21 11:34 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250621113334.7789-1-khaliidcaliy@gmail.com \
--to=khaliidcaliy@gmail.com \
--cc=ardb@kernel.org \
--cc=bp@alien8.de \
--cc=linux-efi@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lukas@wunner.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).