Skip to contentSkip to conversation

pygrub: support grub2 "(hdX, msdosY)" partition syntax

PATCH New Ian Campbell 1 participant 1 message Oct 4, 2010

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 pygrub: support grub2 "(hdX, msdosY)" partition syntax

# HG changeset patch
# User Ian Campbell <[email protected]> # Date 1286181719 -3600
# Node ID 800cca2e5062d736e853f72970dbb3ced62396f8 # Parent fef04cf0bd3285a7f02bc043b280f8126241d55b
pygrub: support grub2 "(hdX,msdosY)" partition syntax

This appeared in Debian Squeeze at some point.

tools/pygrub/src/GrubConf.py +2 -0
diff -r fef04cf0bd32 -r 800cca2e5062 tools/pygrub/src/GrubConf.py
@@ -77,6 +77,8 @@ class GrubDiskPart(object):
             self._part = val
             return
         val = val.replace("(", "").replace(")", "")
+        if val[:5] == "msdos":
+            val = val[5:]
         self._part = int(val)
     part = property(get_part, set_part)