From 571ea5e8f04b7531eb9d94040b0de0988e564230 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andrius=20=C5=A0tikonas?= Date: Sat, 9 Jul 2022 00:24:42 +0100 Subject: [PATCH] kaem-minimal: also set load_option_size field. --- Development/kaem-minimal.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Development/kaem-minimal.c b/Development/kaem-minimal.c index 62d4912..0f5e4e5 100644 --- a/Development/kaem-minimal.c +++ b/Development/kaem-minimal.c @@ -60,6 +60,7 @@ efi_status_t efi_main(efi_handle_t image_handle, struct efi_system_table *system system->boot->allocate_pool(EFI_LOADER_DATA, 2 * max_string, (void **) &command); unsigned int command_length = 0; /* length of command without arguments */ + unsigned int options_length = 0; /* length of command with arguments */ unsigned int i; uint8_t c; efi_uint_t size = 1; @@ -99,7 +100,7 @@ efi_status_t efi_main(efi_handle_t image_handle, struct efi_system_table *system if (command_length == 0 ) { continue; } - + options_length = i; command[i] = 0; system->out->output_string(system->out, L" +> "); @@ -148,6 +149,7 @@ efi_status_t efi_main(efi_handle_t image_handle, struct efi_system_table *system system->boot->open_protocol(child_ih, &guid1, (void **) &child_image, child_ih, 0, EFI_OPEN_PROTOCOL_BY_HANDLE_PROTOCOL); child_image->load_options = command; + child_image->load_options_size = options_length; child_image->device = image->device; /* Run command */