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:
iap10@labyrinth.cl.cam.ac.uk committed 2005-02-01 22:05:38 +00:00
commit d4aa4577a8
2 files changed
+6 -3

No files matched your search

+5 -2
View File
@@ -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 ):
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.