mirror of
https://github.com/xen-project/xen.git
synced 2026-10-29 10:40:03 +01:00
bitkeeper revision 1.1159.212.63 (41fffd320J5fzfKolmEyIb6tg5-a_w)
Merge labyrinth.cl.cam.ac.uk:/auto/groups/xeno-xenod/BK/xen-2.0-testing.bk into labyrinth.cl.cam.ac.uk:/auto/groups/xeno-xenod/BK/xen-unstable.bk
This commit is contained in:
commit
d4aa4577a8
2 files changed
+6
-3
No files matched your search
@@ -66,8 +66,11 @@ def blkdev_name_to_number(name):
|
||||
if re.match( '/dev/sd[a-p]([0-9]|1[0-5])', n):
|
||||
return 8 * 256 + 16 * (ord(n[7:8]) - ord('a')) + int(n[8:])
|
||||
|
||||
if re.match( '/dev/hd[a-p]([0-9]|[1-5][0-9]|6[0-3])', n):
|
||||
return 3 * 256 + 16 * (ord(n[7:8]) - ord('a')) + int(n[8:])
|
||||
if 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)
|
||||
return major * 256 + minor
|
||||
|
||||
# see if this is a hex device number
|
||||
if re.match( '^(0x)?[0-9a-fA-F]+$', name ):
|
||||
|
||||