Mercurial > hg > Members > taiki > EFITest
diff bootx64.c @ 12:56e8a3d49069
add README to how to use efi executable.
author | taiki |
---|---|
date | Sun, 30 Mar 2014 19:39:52 +0900 |
parents | 7d337b6fb379 |
children |
line wrap: on
line diff
--- a/bootx64.c Sun Mar 30 19:15:20 2014 +0900 +++ b/bootx64.c Sun Mar 30 19:39:52 2014 +0900 @@ -52,6 +52,8 @@ CHAR16 *kernel_name = (CHAR16 *)AllocatePool((options - start_ptr + 1) * sizeof(CHAR16)); RtCopyMem(kernel_name, start_ptr, (options - start_ptr) * sizeof(CHAR16)); + + // delete last 0 kernel_name[options - start_ptr] = 0; Print(L"kernel name: -%s- name size: %d\n", kernel_name, (options - start_ptr)); @@ -91,13 +93,11 @@ path = FileDevicePath(handle_buffer[handle_idx], kernel_name); - Print(L"Path Type %d\n", path->Type); if (!path) { status = EFI_NOT_FOUND; break; } - Print(L"OpenSimpleReadFile\n"); status = OpenSimpleReadFile(TRUE, NULL, 0, &path, &device_handle, &read_handle); if (!EFI_ERROR(status)) { @@ -113,8 +113,8 @@ } if (read_handle) { - Print(L"CloseSimpleReadFile.\n"); - CloseSimpleReadFile(read_handle); + Print(L"Should execute CloseSimpleReadFile function.\n"); + //CloseSimpleReadFile(read_handle); } if (path) {