public inbox for linux-ia64@vger.kernel.org
 help / color / mirror / Atom feed
* [Linux-ia64] Re: GPT_HEADER_REVISION_V1_02
@ 2003-02-20  3:28 Matt Domsch
  2003-02-20 19:18 ` Arun Sharma
  2003-02-23 11:41 ` Andrew Clausen
  0 siblings, 2 replies; 3+ messages in thread
From: Matt Domsch @ 2003-02-20  3:28 UTC (permalink / raw)
  To: linux-ia64

> 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

-- 
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




^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Linux-ia64] Re: GPT_HEADER_REVISION_V1_02
  2003-02-20  3:28 [Linux-ia64] Re: GPT_HEADER_REVISION_V1_02 Matt Domsch
@ 2003-02-20 19:18 ` Arun Sharma
  2003-02-23 11:41 ` Andrew Clausen
  1 sibling, 0 replies; 3+ messages in thread
From: Arun Sharma @ 2003-02-20 19:18 UTC (permalink / raw)
  To: linux-ia64

[-- Attachment #1: Type: text/plain, Size: 527 bytes --]

Matt Domsch wrote:

> > 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



[-- Attachment #2: gpt_ver.patch --]
[-- Type: text/plain, Size: 1099 bytes --]

--- parted-1.6.3/libparted/disk_gpt.c-	2003-02-20 11:04:41.000000000 -0800
+++ parted-1.6.3/libparted/disk_gpt.c	2003-02-20 11:06:35.000000000 -0800
@@ -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;

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Linux-ia64] Re: GPT_HEADER_REVISION_V1_02
  2003-02-20  3:28 [Linux-ia64] Re: GPT_HEADER_REVISION_V1_02 Matt Domsch
  2003-02-20 19:18 ` Arun Sharma
@ 2003-02-23 11:41 ` Andrew Clausen
  1 sibling, 0 replies; 3+ messages in thread
From: Andrew Clausen @ 2003-02-23 11:41 UTC (permalink / raw)
  To: linux-ia64

On Thu, Feb 20, 2003 at 11:18:28AM -0800, Arun Sharma wrote:
> >> 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



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2003-02-23 11:41 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-02-20  3:28 [Linux-ia64] Re: GPT_HEADER_REVISION_V1_02 Matt Domsch
2003-02-20 19:18 ` Arun Sharma
2003-02-23 11:41 ` Andrew Clausen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox