diff options
author | Hans de Goede <hdegoede@redhat.com> | 2009-03-09 13:19:55 +0100 |
---|---|---|
committer | Hans de Goede <hdegoede@redhat.com> | 2009-03-09 21:14:15 +0100 |
commit | 9b23fb1cd22f6f2cc4f6b18897e65ab1e4d68328 (patch) | |
tree | 391089f89a236f409bf70952db3e71a199832ef6 /booty/util.py | |
parent | e60e58b1f7a659b448f4080075b399538878c501 (diff) | |
download | anaconda-9b23fb1cd22f6f2cc4f6b18897e65ab1e4d68328.tar.gz anaconda-9b23fb1cd22f6f2cc4f6b18897e65ab1e4d68328.tar.xz anaconda-9b23fb1cd22f6f2cc4f6b18897e65ab1e4d68328.zip |
Fix booty for dmraid
Booty was expecting the xxxxxxx part of /dev/xxxxxx paths instead of
new storage device names, this patch fixes this, making booty work on
dmraid with the new storage code.
Diffstat (limited to 'booty/util.py')
-rw-r--r-- | booty/util.py | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/booty/util.py b/booty/util.py index f9a1b3e84..74ba561ed 100644 --- a/booty/util.py +++ b/booty/util.py @@ -1,10 +1,11 @@ import string -def getDiskPart(dev): +def getDiskPart(dev, storage): + path = storage.devicetree.getDeviceByName(dev).path[5:] cut = len(dev) - if (dev.startswith('rd/') or dev.startswith('ida/') or - dev.startswith('cciss/') or dev.startswith('sx8/') or - dev.startswith('mapper/') or dev.startswith('mmcblk')): + if (path.startswith('rd/') or path.startswith('ida/') or + path.startswith('cciss/') or path.startswith('sx8/') or + path.startswith('mapper/') or path.startswith('mmcblk')): if dev[-2] == 'p': cut = -1 elif dev[-3] == 'p': |