[PATCH 1/1] efi_loader: print file path w/o boot device

Helloworld.efi should print the file path even if the boot device is not set.
Signed-off-by: Heinrich Schuchardt heinrich.schuchardt@canonical.com --- lib/efi_loader/helloworld.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/lib/efi_loader/helloworld.c b/lib/efi_loader/helloworld.c index 6405f58ec3..bd72822c0b 100644 --- a/lib/efi_loader/helloworld.c +++ b/lib/efi_loader/helloworld.c @@ -216,6 +216,10 @@ efi_status_t EFIAPI efi_main(efi_handle_t handle, (con_out, u"Cannot open device path to text protocol\r\n"); goto out; } + con_out->output_string(con_out, u"File path: "); + ret = print_device_path(loaded_image->file_path, device_path_to_text); + if (ret != EFI_SUCCESS) + goto out; if (!loaded_image->device_handle) { con_out->output_string (con_out, u"Missing device handle\r\n"); @@ -234,10 +238,6 @@ efi_status_t EFIAPI efi_main(efi_handle_t handle, ret = print_device_path(device_path, device_path_to_text); if (ret != EFI_SUCCESS) goto out; - con_out->output_string(con_out, u"File path: "); - ret = print_device_path(loaded_image->file_path, device_path_to_text); - if (ret != EFI_SUCCESS) - goto out;
out: boottime->exit(handle, ret, 0, NULL);

On Fri, 12 May 2023 at 22:44, Heinrich Schuchardt heinrich.schuchardt@canonical.com wrote:
Helloworld.efi should print the file path even if the boot device is not set.
Signed-off-by: Heinrich Schuchardt heinrich.schuchardt@canonical.com
lib/efi_loader/helloworld.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/lib/efi_loader/helloworld.c b/lib/efi_loader/helloworld.c index 6405f58ec3..bd72822c0b 100644 --- a/lib/efi_loader/helloworld.c +++ b/lib/efi_loader/helloworld.c @@ -216,6 +216,10 @@ efi_status_t EFIAPI efi_main(efi_handle_t handle, (con_out, u"Cannot open device path to text protocol\r\n"); goto out; }
con_out->output_string(con_out, u"File path: ");
ret = print_device_path(loaded_image->file_path, device_path_to_text);
if (ret != EFI_SUCCESS)
goto out; if (!loaded_image->device_handle) { con_out->output_string (con_out, u"Missing device handle\r\n");
@@ -234,10 +238,6 @@ efi_status_t EFIAPI efi_main(efi_handle_t handle, ret = print_device_path(device_path, device_path_to_text); if (ret != EFI_SUCCESS) goto out;
con_out->output_string(con_out, u"File path: ");
ret = print_device_path(loaded_image->file_path, device_path_to_text);
if (ret != EFI_SUCCESS)
goto out;
out: boottime->exit(handle, ret, 0, NULL); -- 2.39.2
Reviewed-by: Ilias Apalodimas ilias.apalodimas@linaro.org
participants (2)
-
Heinrich Schuchardt
-
Ilias Apalodimas