debuggers.hg
changeset 3638:11b95fad5f5d
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
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
author | iap10@labyrinth.cl.cam.ac.uk |
---|---|
date | Tue Feb 01 22:05:38 2005 +0000 (2005-02-01) |
parents | ed902e5c4b49 0ebbb4b2bbdc |
children | ef59b38283a5 e6af5d8f8b39 |
files | linux-2.6.10-xen-sparse/drivers/xen/blkfront/vbd.c tools/python/xen/xend/server/blkif.py |
line diff
1.1 --- a/linux-2.6.10-xen-sparse/drivers/xen/blkfront/vbd.c Tue Feb 01 21:26:34 2005 +0000 1.2 +++ b/linux-2.6.10-xen-sparse/drivers/xen/blkfront/vbd.c Tue Feb 01 22:05:38 2005 +0000 1.3 @@ -317,7 +317,7 @@ static int xlvbd_init_device(vdisk_t *xd 1.4 down(&bd->bd_sem); 1.5 1.6 gd = xlvbd_get_gendisk(mi, minor, xd); 1.7 - if (mi == NULL) { 1.8 + if (gd == NULL) { 1.9 err = -EPERM; 1.10 goto out; 1.11 }
2.1 --- a/tools/python/xen/xend/server/blkif.py Tue Feb 01 21:26:34 2005 +0000 2.2 +++ b/tools/python/xen/xend/server/blkif.py Tue Feb 01 22:05:38 2005 +0000 2.3 @@ -66,8 +66,11 @@ def blkdev_name_to_number(name): 2.4 if re.match( '/dev/sd[a-p]([0-9]|1[0-5])', n): 2.5 return 8 * 256 + 16 * (ord(n[7:8]) - ord('a')) + int(n[8:]) 2.6 2.7 - if re.match( '/dev/hd[a-p]([0-9]|[1-5][0-9]|6[0-3])', n): 2.8 - return 3 * 256 + 16 * (ord(n[7:8]) - ord('a')) + int(n[8:]) 2.9 + if re.match( '/dev/hd[a-t]([1-9]|[1-5][0-9]|6[0-3])?', n): 2.10 + ide_majors = [ 3, 22, 33, 34, 56, 57, 88, 89, 90, 91 ] 2.11 + major = ide_majors[(ord(n[7:8]) - ord('a')) / 2] 2.12 + minor = ((ord(n[7:8]) - ord('a')) % 2) * 64 + int(n[8:] or 0) 2.13 + return major * 256 + minor 2.14 2.15 # see if this is a hex device number 2.16 if re.match( '^(0x)?[0-9a-fA-F]+$', name ):