[<prev] [next>] [day] [month] [year] [list]
Message-ID: <20250621113334.7789-1-khaliidcaliy@gmail.com>
Date: Sat, 21 Jun 2025 11:33:32 +0000
From: Khalid Ali <khaliidcaliy@...il.com>
To: ardb@...nel.org,
lukas@...ner.de,
bp@...en8.de
Cc: linux-efi@...r.kernel.org,
linux-kernel@...r.kernel.org,
Khalid Ali <khaliidcaliy@...il.com>
Subject: [PATCH] efi/libstub: Print status codes on failure
From: Khalid Ali <khaliidcaliy@...il.com>
Print status codes on errors. This makes easier to understand the reason
of failure.
Signed-off-by: Khalid Ali <khaliidcaliy@...il.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
Powered by blists - more mailing lists