|
|
|
|
|
|
|
|
|
|
xen-changelog
[Xen-changelog] [xen-unstable] pygrub: Support GPT (GUID Partition Table
# 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 <=
|
|
|
|
|