From: Ian Campbell Subject: [PATCH] pygrub: support grub2 "(hdX, msdosY)" partition syntax Date: Mon, 04 Oct 2010 09:43:10 +0100 Message-ID: <800cca2e5062d736e853.1286181790@localhost.localdomain> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: xen-devel@lists.xensource.com Cc: Ian Campbell List-Id: xen-devel@lists.xenproject.org # HG changeset patch # User Ian Campbell # Date 1286181719 -3600 # Node ID 800cca2e5062d736e853f72970dbb3ced62396f8 # Parent fef04cf0bd3285a7f02bc043b280f8126241d55b pygrub: support grub2 "(hdX,msdosY)" partition syntax This appeared in Debian Squeeze at some point. Signed-off-by: Ian Campbell diff -r fef04cf0bd32 -r 800cca2e5062 tools/pygrub/src/GrubConf.py --- a/tools/pygrub/src/GrubConf.py Fri Oct 01 14:19:25 2010 +0100 +++ b/tools/pygrub/src/GrubConf.py Mon Oct 04 09:41:59 2010 +0100 @@ -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)