public inbox for linux-ia64@vger.kernel.org
 help / color / mirror / Atom feed
From: Arun Sharma <arun.sharma@intel.com>
To: linux-ia64@vger.kernel.org
Subject: [Linux-ia64] Re: GPT_HEADER_REVISION_V1_02
Date: Thu, 20 Feb 2003 19:18:28 +0000	[thread overview]
Message-ID: <marc-linux-ia64-105590709805892@msgid-missing> (raw)
In-Reply-To: <marc-linux-ia64-105590709805884@msgid-missing>

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

  reply	other threads:[~2003-02-20 19:18 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-02-20  3:28 [Linux-ia64] Re: GPT_HEADER_REVISION_V1_02 Matt Domsch
2003-02-20 19:18 ` Arun Sharma [this message]
2003-02-23 11:41 ` Andrew Clausen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=marc-linux-ia64-105590709805892@msgid-missing \
    --to=arun.sharma@intel.com \
    --cc=linux-ia64@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox