GPT_HEADER_REVISION_V1_02
Quoted 2 lines
We'll issue a clarification on this topic. For now, can we have parted revert to
GPT_HEADER_REVISION_V1_00?
No objections. Will you be submitting a patch, or should I?
With this change, any time the partition table is updated, the old version will get wiped out and replaced with the new version, which I believe is the desired behavior.
Thanks,
Matt
Signature · 4 lines
Matt Domsch Sr. Software Engineer, Lead Engineer, Architect Dell Linux Solutions www.dell.com/linux Linux on Dell mailing lists @ http://lists.us.dell.com
Quoted 5 lines · Matt Domsch
Quoted 2 lines
We'll issue a clarification on this topic. For now, can we have parted revert to
GPT_HEADER_REVISION_V1_00?No objections. Will you be submitting a patch, or should I?
The attached patch worked fine for me. When looking at a GPT with revision number 1.02, parted complains about a newer version number it doesn't know about, but if the user ignores it and flips a flag on one of the GPT partitions twice (essentially a nop), the GPT revision number gets downgraded to 1.0.
-Arun
libparted/disk_gpt.c renamed from libparted/disk_gpt.c- +2 -3
@@ -52,7 +52,6 @@#define MSDOS_MBR_SIGNATURE 0xaa55#define GPT_HEADER_SIGNATURE 0x5452415020494645 -#define GPT_HEADER_REVISION_V1_02 0x00010200#define GPT_HEADER_REVISION_V1_00 0x00010000#define GPT_HEADER_REVISION_V0_99 0x00009900
@@ -458,7 +457,7 @@ PED_ASSERT (_header_is_valid (gpt), return 0);#ifndef DISCOVER_ONLY -if (PED_CPU_TO_LE32 (gpt->Revision) >GPT_HEADER_REVISION_V1_02 +if (PED_CPU_TO_LE32 (gpt->Revision) >GPT_HEADER_REVISION_V1_00 ||PED_CPU_TO_LE32 (gpt->HeaderSize) !=92 ) { if (ped_exception_throw ( PED_EXCEPTION_WARNING,
@@ -702,7 +701,7 @@memset (gpt,0 ,sizeof (GuidPartitionTableHeader_t)); gpt->Signature =PED_CPU_TO_LE64 (GPT_HEADER_SIGNATURE ); - gpt->Revision =PED_CPU_TO_LE32 (GPT_HEADER_REVISION_V1_02 ); + gpt->Revision =PED_CPU_TO_LE32 (GPT_HEADER_REVISION_V1_00 ); gpt->HeaderSize =PED_CPU_TO_LE32 (92 );/* per 1.02 spec */ gpt->HeaderCRC32 =0 ; gpt->Reserved1 =0 ;
Quoted 7 lines · Arun Sharma
Quoted 5 lines
Quoted 2 lines
We'll issue a clarification on this topic. For now, can we have parted revert to
GPT_HEADER_REVISION_V1_00?No objections. Will you be submitting a patch, or should I?
The attached patch worked fine for me.
Thanks Arun. Sorry for the delay... working full time, hot weather (computer over-heating!), preparing for uni and all...
Cheers,
Andrew