WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

[Xen-changelog] [xen-unstable] pygrub: Support GPT (GUID Partition Table

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] pygrub: Support GPT (GUID Partition Table) as used by EFI.
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Thu, 12 Apr 2007 09:20:09 -0700
Delivery-date: Thu, 12 Apr 2007 09:19:36 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User kfraser@xxxxxxxxxxxxxxxxxxxxx
# Date 1176301634 -3600
# Node ID ed78f08aad6195810f2c8296dea43eb5e3ce87ab
# Parent  83e4261378e787c45133eb98459958c617e34ee7
pygrub: Support GPT (GUID Partition Table) as used by EFI.
Signed-off-by: Shinya Kuwamura <kuwa@xxxxxxxxxxxxxx>
Signed-off-by: Tomohiro Takahashi <takatom@xxxxxxxxxxxxxx>
---
 tools/pygrub/src/pygrub |    7 +++++++
 1 files changed, 7 insertions(+)

diff -r 83e4261378e7 -r ed78f08aad61 tools/pygrub/src/pygrub
--- a/tools/pygrub/src/pygrub   Wed Apr 11 15:17:17 2007 +0100
+++ b/tools/pygrub/src/pygrub   Wed Apr 11 15:27:14 2007 +0100
@@ -58,6 +58,13 @@ def get_active_partition(file):
         # active partition has 0x80 as the first byte
         if struct.unpack("<c", buf[poff:poff+1]) == ('\x80',):
             return buf[poff:poff+16]
+
+        # type=0xee: GUID partition table
+        # XXX assume the first partition is active
+        if struct.unpack("<c", buf[poff+4:poff+5]) == ('\xee',):
+            os.lseek(fd, 0x400, 0)
+            buf = os.read(fd, 512)
+            return buf[24:40] # XXX buf[32:40]
 
     # if there's not a partition marked as active, fall back to
     # the first partition

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] pygrub: Support GPT (GUID Partition Table) as used by EFI., Xen patchbot-unstable <=