]> glassweightruler.freedombox.rocks Git - Ventoy.git/commitdiff
Fix a bug when boot in F2 browser mode if the computer has more than one disks with...
authorlongpanda <admin@ventoy.net>
Sun, 8 May 2022 03:41:12 +0000 (11:41 +0800)
committerlongpanda <admin@ventoy.net>
Sun, 8 May 2022 03:41:12 +0000 (11:41 +0800)
EDK2/edk2_mod/edk2-edk2-stable201911/MdeModulePkg/Application/Ventoy/Ventoy.c
EDK2/edk2_mod/edk2-edk2-stable201911/MdeModulePkg/Application/Ventoy/Ventoy.h
INSTALL/ventoy/ventoy_aa64.efi
INSTALL/ventoy/ventoy_ia32.efi
INSTALL/ventoy/ventoy_x64.efi

index 67e6881a4b5566e1cc9bf4f018df730237063fd5..8341f314e619f010d2759ffc0ecb89167dbd090c 100644 (file)
@@ -577,7 +577,8 @@ STATIC EFI_STATUS EFIAPI ventoy_find_iso_disk(IN EFI_HANDLE ImageHandle)
             continue;
         }
 
-        if (CompareMem(g_chain->os_param.vtoy_disk_guid, pBuffer + 0x180, 16) == 0)
+        if (CompareMem(g_chain->os_param.vtoy_disk_guid, pBuffer + 0x180, 16) == 0 &&
+            CompareMem(g_chain->os_param.vtoy_disk_signature, pBuffer + 0x1b8, 4) == 0)
         {
             pMBR = (MBR_HEAD *)pBuffer;
             if (g_os_param_reserved[6] == 0 && pMBR->PartTbl[0].FsFlag != 0xEE)
@@ -599,7 +600,7 @@ STATIC EFI_STATUS EFIAPI ventoy_find_iso_disk(IN EFI_HANDLE ImageHandle)
                               Handles[i],
                               EFI_OPEN_PROTOCOL_GET_PROTOCOL);
             
-            debug("Find Ventoy Disk Handle:%p DP:%s", Handles[i], 
+            debug("Find Ventoy Disk Sig Handle:%p DP:%s", Handles[i], 
                 ConvertDevicePathToText(gBlockData.pDiskDevPath, FALSE, FALSE));
             break;
         }
index 30ed3c5c9cb71ef6385db4aa633491a996d37e99..0e2b3fa84ad41c74a762b947ddda28ed8d255290 100644 (file)
@@ -98,7 +98,9 @@ typedef struct ventoy_os_param
     
     UINT64  vtoy_reserved[4];     // Internal use by ventoy
 
-    UINT8   reserved[31];
+    UINT8   vtoy_disk_signature[4];
+
+    UINT8   reserved[27];
 }ventoy_os_param;
 
 #pragma pack()
index e240dbb81f637dc1a82b1c2c96a009dcd8c01a1f..20823370252736b182bce6f115d7e3c956f5aa9a 100644 (file)
Binary files a/INSTALL/ventoy/ventoy_aa64.efi and b/INSTALL/ventoy/ventoy_aa64.efi differ
index dad50d66ad7bc72ea94c2ca0f56f7e6514332642..dd1b9ec3e28d4a27b786df7c00d7d9e1e6b3c602 100644 (file)
Binary files a/INSTALL/ventoy/ventoy_ia32.efi and b/INSTALL/ventoy/ventoy_ia32.efi differ
index 3facee7ee898983ee78d1300fe8dc7f658b3a734..24c3765876181a52039a72ce8b0e9366f03280e5 100644 (file)
Binary files a/INSTALL/ventoy/ventoy_x64.efi and b/INSTALL/ventoy/ventoy_x64.efi differ