From: kfraser@localhost.localdomain Date: Fri, 12 Jan 2007 14:42:07 +0000 (+0000) Subject: Parse Solaris VTOCs in pygrub. X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~15405^2~25 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=ce9e6668ac8c0c6188026d2374d15b37dee6186c;p=xen.git Parse Solaris VTOCs in pygrub. Signed-off-by: John Levon --- diff --git a/tools/pygrub/src/pygrub b/tools/pygrub/src/pygrub index ab8a20f31b..13b05d9a67 100644 --- a/tools/pygrub/src/pygrub +++ b/tools/pygrub/src/pygrub @@ -48,8 +48,7 @@ def is_disk_image(file): return True return False -SECTOR_SIZE=512 -def get_active_offset(file): +def get_active_partition(file): """Find the offset for the start of the first active partition " "in the disk image file.""" @@ -58,22 +57,56 @@ def get_active_offset(file): for poff in (446, 462, 478, 494): # partition offsets # active partition has 0x80 as the first byte if struct.unpack("