diff options
author | Ian Campbell <ian.campbell@citrix.com> | 2013-10-10 10:37:37 +0100 |
---|---|---|
committer | Ian Jackson <Ian.Jackson@eu.citrix.com> | 2013-10-14 17:40:36 +0100 |
commit | b2e55da3cd6f5911b833edb9e1fd9a22110c2a74 (patch) | |
tree | 56fc7b9d3e4db8b724a8bdb498f97b0ffd41dc04 /tools/pygrub/src | |
parent | a77eb86f44e52c5aea7f0ba7023600c043a9cdcd (diff) | |
download | xen-b2e55da3cd6f5911b833edb9e1fd9a22110c2a74.tar.gz xen-b2e55da3cd6f5911b833edb9e1fd9a22110c2a74.tar.bz2 xen-b2e55da3cd6f5911b833edb9e1fd9a22110c2a74.zip |
pygrub: Support (/dev/xvda) style disk specifications
You get these if you install Debian Wheezy as HVM and then try to convert to
PV.
This is Debian bug #603391.
Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Tested-by: Tril <tril@metapipe.net>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
Diffstat (limited to 'tools/pygrub/src')
-rw-r--r-- | tools/pygrub/src/GrubConf.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/tools/pygrub/src/GrubConf.py b/tools/pygrub/src/GrubConf.py index 6324c625fe..cb853c9cba 100644 --- a/tools/pygrub/src/GrubConf.py +++ b/tools/pygrub/src/GrubConf.py @@ -67,7 +67,11 @@ class GrubDiskPart(object): return self._disk def set_disk(self, val): val = val.replace("(", "").replace(")", "") - self._disk = int(val[2:]) + if val.startswith("/dev/xvd"): + disk = val[len("/dev/xvd")] + self._disk = ord(disk)-ord('a') + else: + self._disk = int(val[2:]) disk = property(get_disk, set_disk) def get_part(self): |