ia64/xen-unstable

changeset 17929:81d47e75ce1a

tools/python: fix TypeError for 17903:0728459b3c8d

If `hda' is used in domU config file and domain-0 has /dev/hda,
creating a domain failed by TypeError:

File "//usr/lib/python/xen/xend/server/blkif.py", line 84, in
getDeviceDetails
(device_path, devid) = blkif.blkdev_name_to_number(dev)
TypeError: unpack non-sequence

Signed-off-by: KUWAMURA Shin'ya <kuwa@jp.fujitsu.com>
author Keir Fraser <keir.fraser@citrix.com>
date Mon Jun 30 10:02:21 2008 +0100 (2008-06-30)
parents c5875621d79a
children 51b392ab1912
files tools/python/xen/util/blkif.py
line diff
     1.1 --- a/tools/python/xen/util/blkif.py	Mon Jun 30 10:01:44 2008 +0100
     1.2 +++ b/tools/python/xen/util/blkif.py	Mon Jun 30 10:02:21 2008 +0100
     1.3 @@ -20,7 +20,7 @@ def blkdev_name_to_number(name):
     1.4      devnum = None
     1.5  
     1.6      try:
     1.7 -        return os.stat(n).st_rdev
     1.8 +        return (devname, os.stat(n).st_rdev)
     1.9      except Exception, ex:
    1.10          pass
    1.11