aboutsummaryrefslogtreecommitdiffstats
path: root/tools/python
diff options
context:
space:
mode:
authorKeir Fraser <keir.fraser@citrix.com>2009-03-05 15:10:17 +0000
committerKeir Fraser <keir.fraser@citrix.com>2009-03-05 15:10:17 +0000
commiteea1a2ea39c515883920171be2e63286f3c89e94 (patch)
tree26c8795c63b804558e8b7583dab9f0d6eff736df /tools/python
parentb6f1cfa1c3e27c81db389231de8abaa2b1780de0 (diff)
downloadxen-eea1a2ea39c515883920171be2e63286f3c89e94.tar.gz
xen-eea1a2ea39c515883920171be2e63286f3c89e94.tar.bz2
xen-eea1a2ea39c515883920171be2e63286f3c89e94.zip
xend: blkif hda regexp fix
Signed-off-by: Michal Novotny <minovotn@redhat.com>
Diffstat (limited to 'tools/python')
-rw-r--r--tools/python/xen/util/blkif.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/python/xen/util/blkif.py b/tools/python/xen/util/blkif.py
index 74935774a6..29b23fb7dd 100644
--- a/tools/python/xen/util/blkif.py
+++ b/tools/python/xen/util/blkif.py
@@ -33,7 +33,7 @@ def blkdev_name_to_number(name):
major = scsi_major[((ord(n[7:8]) - ord('a') + 1) * 26 + (ord(n[8:9]) - ord('a'))) / 16 ]
minor = (((ord(n[7:8]) - ord('a') + 1 ) * 26 + (ord(n[8:9]) - ord('a'))) % 16) * 16 + int(n[9:] or 0)
devnum = major * 256 + minor
- elif re.match( '/dev/hd[a-t]([1-9]|[1-5][0-9]|6[0-3])?', n):
+ elif re.match( '/dev/hd[a-t]([1-9]|[1-5][0-9]|6[0-3])?$', n):
ide_majors = [ 3, 22, 33, 34, 56, 57, 88, 89, 90, 91 ]
major = ide_majors[(ord(n[7:8]) - ord('a')) / 2]
minor = ((ord(n[7:8]) - ord('a')) % 2) * 64 + int(n[8:] or 0)