mirror of
https://github.com/ventoy/Ventoy.git
synced 2025-01-27 06:33:23 -05:00
Fix a bug when boot in F2 browser mode if the computer has more than one disks with same size.
This commit is contained in:
parent
121d927367
commit
fe137522ad
@ -577,7 +577,8 @@ STATIC EFI_STATUS EFIAPI ventoy_find_iso_disk(IN EFI_HANDLE ImageHandle)
|
|||||||
continue;
|
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;
|
pMBR = (MBR_HEAD *)pBuffer;
|
||||||
if (g_os_param_reserved[6] == 0 && pMBR->PartTbl[0].FsFlag != 0xEE)
|
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],
|
Handles[i],
|
||||||
EFI_OPEN_PROTOCOL_GET_PROTOCOL);
|
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));
|
ConvertDevicePathToText(gBlockData.pDiskDevPath, FALSE, FALSE));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -98,7 +98,9 @@ typedef struct ventoy_os_param
|
|||||||
|
|
||||||
UINT64 vtoy_reserved[4]; // Internal use by ventoy
|
UINT64 vtoy_reserved[4]; // Internal use by ventoy
|
||||||
|
|
||||||
UINT8 reserved[31];
|
UINT8 vtoy_disk_signature[4];
|
||||||
|
|
||||||
|
UINT8 reserved[27];
|
||||||
}ventoy_os_param;
|
}ventoy_os_param;
|
||||||
|
|
||||||
#pragma pack()
|
#pragma pack()
|
||||||
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user