Commit 89938e3c authored by longpanda's avatar longpanda
Browse files

fix a bug about update with GPT partition style.

parent 85840f62
No preview for this file type
...@@ -1814,7 +1814,7 @@ int UpdateVentoy2PhyDrive(PHY_DRIVE_INFO *pPhyDrive) ...@@ -1814,7 +1814,7 @@ int UpdateVentoy2PhyDrive(PHY_DRIVE_INFO *pPhyDrive)
Log("Lock volume for update .......................... "); Log("Lock volume for update .......................... ");
hVolume = INVALID_HANDLE_VALUE; hVolume = INVALID_HANDLE_VALUE;
Status = GetVentoyVolumeName(pPhyDrive->PhyDrive, MBR.PartTbl[1].StartSectorId, DriveLetters, sizeof(DriveLetters), TRUE); Status = GetVentoyVolumeName(pPhyDrive->PhyDrive, (UINT32)StartSector, DriveLetters, sizeof(DriveLetters), TRUE);
if (ERROR_SUCCESS == Status) if (ERROR_SUCCESS == Status)
{ {
Log("Now lock and dismount volume <%s>", DriveLetters); Log("Now lock and dismount volume <%s>", DriveLetters);
......
...@@ -588,7 +588,7 @@ int VentoyFillGpt(UINT64 DiskSizeBytes, VTOY_GPT_INFO *pInfo) ...@@ -588,7 +588,7 @@ int VentoyFillGpt(UINT64 DiskSizeBytes, VTOY_GPT_INFO *pInfo)
CoCreateGuid(&(Table[1].PartGuid)); CoCreateGuid(&(Table[1].PartGuid));
Table[1].StartLBA = Table[0].LastLBA + 1; Table[1].StartLBA = Table[0].LastLBA + 1;
Table[1].LastLBA = Table[1].StartLBA + VENTOY_EFI_PART_SIZE / 512 - 1; Table[1].LastLBA = Table[1].StartLBA + VENTOY_EFI_PART_SIZE / 512 - 1;
Table[1].Attr = 0xC000000000000001ULL; Table[1].Attr = 0x8000000000000001ULL;
memcpy(Table[1].Name, L"VTOYEFI", 7 * 2); memcpy(Table[1].Name, L"VTOYEFI", 7 * 2);
#if 0 #if 0
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment