From: Jan Kiszka <[email protected]> This is retrieving the medium path from the input string, irrespective if this is where the system booted from.
Signed-off-by: Jan Kiszka <[email protected]> --- include/utils.h | 2 +- main.c | 2 +- utils.c | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/include/utils.h b/include/utils.h index 8b99553..982630f 100644 --- a/include/utils.h +++ b/include/utils.h @@ -38,7 +38,7 @@ EFI_STATUS get_volumes(VOLUME_DESC **volumes, UINTN *count); EFI_STATUS close_volumes(VOLUME_DESC *volumes, UINTN count); EFI_DEVICE_PATH *FileDevicePathFromConfig(EFI_HANDLE device, CHAR16 *payloadpath); -CHAR16 *GetBootMediumPath(const CHAR16 *input); +CHAR16 *GetMediumPath(const CHAR16 *input); typedef EFI_STATUS (*WATCHDOG_PROBE)(EFI_PCI_IO *, UINT16, UINT16, UINTN); diff --git a/main.c b/main.c index aa9ca9b..3db2c91 100644 --- a/main.c +++ b/main.c @@ -155,7 +155,7 @@ EFI_STATUS efi_main(EFI_HANDLE image_handle, EFI_SYSTEM_TABLE *system_table) } tmp = DevicePathToStr(DevicePathFromHandle(loaded_image->DeviceHandle)); - boot_medium_path = GetBootMediumPath(tmp); + boot_medium_path = GetMediumPath(tmp); FreePool(tmp); INFO(L"Boot medium: %s\n", boot_medium_path); diff --git a/utils.c b/utils.c index 178f4a8..c0feb61 100644 --- a/utils.c +++ b/utils.c @@ -26,7 +26,7 @@ static BOOLEAN IsOnBootMedium(EFI_DEVICE_PATH *dp) BOOLEAN result = FALSE; tmp = DevicePathToStr(dp); - device_path = GetBootMediumPath(tmp); + device_path = GetMediumPath(tmp); FreePool(tmp); if (StrCmp(device_path, boot_medium_path) == 0) { @@ -262,7 +262,7 @@ EFI_DEVICE_PATH *FileDevicePathFromConfig(EFI_HANDLE device, return appendeddevpath; } -CHAR16 *GetBootMediumPath(const CHAR16 *input) +CHAR16 *GetMediumPath(const CHAR16 *input) { CHAR16 *dst; UINTN len; -- 2.47.3 -- You received this message because you are subscribed to the Google Groups "EFI Boot Guard" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion visit https://groups.google.com/d/msgid/efibootguard-dev/ba0a0c9d47d9ea680bd43c9a9497df9375b5f758.1775543350.git.jan.kiszka%40siemens.com.
