]> git.pld-linux.org Git - packages/xen.git/blob - pygrubfix.patch
- kickstart update to 4.13.1
[packages/xen.git] / pygrubfix.patch
1 diff -dur xen-4.2.0.orig/tools/pygrub/src/pygrub xen-4.2.0/tools/pygrub/src/pygrub
2 --- xen-4.2.0.orig/tools/pygrub/src/pygrub      2012-09-17 12:21:18.000000000 +0200
3 +++ xen-4.2.0/tools/pygrub/src/pygrub   2012-10-22 10:57:09.000000000 +0200
4 @@ -119,6 +119,7 @@
5      fd = os.open(file, os.O_RDONLY)
6      buf = os.read(fd, 512)
7      os.close(fd)
8 +    offzerocount = 0
9      for poff in (446, 462, 478, 494): # partition offsets
10  
11          # MBR contains a 16 byte descriptor per partition
12 @@ -128,6 +129,7 @@
13          
14          # offset == 0 implies this partition is not enabled
15          if offset == 0:
16 +            offzerocount += 1
17              continue
18  
19          if type == FDISK_PART_SOLARIS or type == FDISK_PART_SOLARIS_OLD:
20 @@ -148,6 +150,9 @@
21          else:
22              part_offs.append(offset)
23  
24 +    if offzerocount == 4:
25 +        # Might be a grub boot sector pretending to be an MBR
26 +        part_offs.append(0)
27      return part_offs
28  
29  class GrubLineEditor(curses.textpad.Textbox):
This page took 0.024561 seconds and 3 git commands to generate.