X-Git-Url: https://glassweightruler.freedombox.rocks/gitweb/Ventoy.git/blobdiff_plain/7b78fe555ed949376d708a8310f537ce26013b0a..56a1543f7de302bbb0a9f400a36efcba16441375:/EDK2/edk2_mod/edk2-edk2-stable201911/MdeModulePkg/Application/Ventoy/VentoyProtocol.c diff --git a/EDK2/edk2_mod/edk2-edk2-stable201911/MdeModulePkg/Application/Ventoy/VentoyProtocol.c b/EDK2/edk2_mod/edk2-edk2-stable201911/MdeModulePkg/Application/Ventoy/VentoyProtocol.c index a5610e5..8584d5c 100644 --- a/EDK2/edk2_mod/edk2-edk2-stable201911/MdeModulePkg/Application/Ventoy/VentoyProtocol.c +++ b/EDK2/edk2_mod/edk2-edk2-stable201911/MdeModulePkg/Application/Ventoy/VentoyProtocol.c @@ -628,7 +628,6 @@ STATIC UINTN ventoy_get_current_device_path_id(VOID) { UINTN i = 0; UINTN Count = 0; - UINTN NameLen = 0; UINTN MaxId = 0; UINTN CurId = 0; BOOLEAN Find = FALSE; @@ -637,8 +636,6 @@ STATIC UINTN ventoy_get_current_device_path_id(VOID) EFI_DEVICE_PATH_PROTOCOL *DevicePath = NULL; VENDOR_DEVICE_PATH *venPath = NULL; - NameLen = StrSize(L"ventoy_xxx"); - Status = gBS->LocateHandleBuffer(ByProtocol, &gEfiDevicePathProtocolGuid, NULL, &Count, &Handles); if (EFI_ERROR(Status)) @@ -1409,6 +1406,16 @@ STATIC EFI_STATUS EFIAPI ventoy_wrapper_file_open debug("## ventoy_wrapper_file_open <%s> ", Name); + if ((Mode & EFI_FILE_MODE_WRITE) > 0 && StrCmp(Name, L"\\loader\\random-seed") == 0) + { + if (gDebugPrint) + { + debug("## ventoy_wrapper_file_open return NOT_FOUND for random-seed %lx", Mode); + sleep(3); + } + return EFI_NOT_FOUND; + } + Status = g_original_fopen(This, New, Name, Mode, Attributes); if (EFI_ERROR(Status)) {