From da746c608fc7acbb4c9763d08c97fcd9584b809b Mon Sep 17 00:00:00 2001 From: longpanda Date: Mon, 21 Jun 2021 13:27:41 +0800 Subject: [PATCH] Set hidden attribute for VTOYEFI part in GPT partition style --- LinuxGUI/Ventoy2Disk/Core/ventoy_util.c | 2 +- Ventoy2Disk/Ventoy2Disk/Utility.c | 2 +- vtoygpt/vtoygpt.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/LinuxGUI/Ventoy2Disk/Core/ventoy_util.c b/LinuxGUI/Ventoy2Disk/Core/ventoy_util.c index d15a4191..38ac8d59 100644 --- a/LinuxGUI/Ventoy2Disk/Core/ventoy_util.c +++ b/LinuxGUI/Ventoy2Disk/Core/ventoy_util.c @@ -412,7 +412,7 @@ int ventoy_fill_gpt(uint64_t size, uint64_t reserve, int align4k, VTOY_GPT_INFO ventoy_gen_preudo_uuid(&(Table[1].PartGuid)); Table[1].StartLBA = Table[0].LastLBA + 1; Table[1].LastLBA = Table[1].StartLBA + VTOYEFI_PART_BYTES / 512 - 1; - Table[1].Attr = 0x8000000000000001ULL; + Table[1].Attr = 0xC000000000000001ULL; ventoy_fill_gpt_partname(Table[1].Name, "VTOYEFI"); #if 0 diff --git a/Ventoy2Disk/Ventoy2Disk/Utility.c b/Ventoy2Disk/Ventoy2Disk/Utility.c index 800855e6..6b441607 100644 --- a/Ventoy2Disk/Ventoy2Disk/Utility.c +++ b/Ventoy2Disk/Ventoy2Disk/Utility.c @@ -659,7 +659,7 @@ int VentoyFillGpt(UINT64 DiskSizeBytes, VTOY_GPT_INFO *pInfo) CoCreateGuid(&(Table[1].PartGuid)); Table[1].StartLBA = Table[0].LastLBA + 1; Table[1].LastLBA = Table[1].StartLBA + VENTOY_EFI_PART_SIZE / 512 - 1; - Table[1].Attr = 0x8000000000000001ULL; + Table[1].Attr = 0xC000000000000001ULL; memcpy(Table[1].Name, L"VTOYEFI", 7 * 2); #if 0 diff --git a/vtoygpt/vtoygpt.c b/vtoygpt/vtoygpt.c index f9c953a2..705f750d 100644 --- a/vtoygpt/vtoygpt.c +++ b/vtoygpt/vtoygpt.c @@ -244,7 +244,7 @@ int DumpGptInfo(VTOY_GPT_INFO *pGptInfo) return 0; } -#define VENTOY_EFI_PART_ATTR 0x8000000000000001ULL +#define VENTOY_EFI_PART_ATTR 0xC000000000000001ULL int main(int argc, const char **argv) {