[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] * support proper scsi disk name
# HG changeset patch # User smh22@xxxxxxxxxxxxxxxxxxxx # Node ID 706733e1ecdf4b2bb3ff7a31bd0c2d9ae4ae2849 # Parent a75db157d12fe183e00a62028cdcc08377c4a8f6 * support proper scsi disk name * xvd now has an official lanana assigned major, use it Signed-off-by: Jeremy Katz <katzj@xxxxxxxxxx> diff -r a75db157d12f -r 706733e1ecdf tools/python/xen/util/blkif.py --- a/tools/python/xen/util/blkif.py Tue Aug 2 09:26:30 2005 +++ b/tools/python/xen/util/blkif.py Tue Aug 2 09:29:56 2005 @@ -24,14 +24,17 @@ log.debug("exception looking up device number for %s: %s", name, ex) pass - 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/sd[a-p]([1-9]|1[0-5])?', n): + return 8 * 256 + 16 * (ord(n[7:8]) - ord('a')) + int(n[8:] or 0) 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 + + if re.match( '/dev/xvd[a-p]([1-9]|1[0-5])?', n): + return 202 * 256 + 16 * (ord(n[8:9]) - ord('a')) + int(n[9:] or 0) # see if this is a hex device number if re.match( '^(0x)?[0-9a-fA-F]+$', name ): _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |