]> xenbits.xensource.com Git - people/vhanquez/xen.git/commitdiff
pygrub: Allow GPT partition references
authorMichael Young <m.a.young@durham.ac.uk>
Tue, 10 Jan 2012 17:08:17 +0000 (17:08 +0000)
committerMichael Young <m.a.young@durham.ac.uk>
Tue, 10 Jan 2012 17:08:17 +0000 (17:08 +0000)
The grub2 configuration file in Fedora 16 can have GPT partition
references like (hd0,gpt2) so remove the "gpt" string where necessary

Signed-off-by: Michael Young <m.a.young@durham.ac.uk>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
xen-unstable changeset: 24000:65679fee0177
Backport-requested-by: Pasi Karkkainen <pasik@iki.fi>
Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
tools/pygrub/src/GrubConf.py

index e19f0c25a769d195f0bcbded17234041fa6b26e9..26861af24f2a8807c4249426541af74df7f8f6a8 100644 (file)
@@ -79,6 +79,8 @@ class GrubDiskPart(object):
         val = val.replace("(", "").replace(")", "")
         if val[:5] == "msdos":
             val = val[5:]
+        if val[:3] == "gpt":
+            val = val[3:]
         self._part = int(val)
     part = property(get_part, set_part)