ia64/xen-unstable

changeset 12189:cc6f0a3596fc

Raise an exception if blkdev_name_to_number fails, to improve the error message.

Fix came from Glauber de Oliveira Costa, and is one half of xen-unstable
11831:f5321161c649fe4f07027250c4a1f3c4b5fc2ed9.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
author Ewan Mellor <ewan@xensource.com>
date Sat Oct 28 17:58:00 2006 +0100 (2006-10-28)
parents f9446aa6c786
children f3be4922cc8b
files tools/python/xen/xend/server/blkif.py
line diff
     1.1 --- a/tools/python/xen/xend/server/blkif.py	Thu Oct 05 16:17:06 2006 +0100
     1.2 +++ b/tools/python/xen/xend/server/blkif.py	Sat Oct 28 17:58:00 2006 +0100
     1.3 @@ -80,6 +80,9 @@ class BlkifController(DevController):
     1.4                           'acm_policy' : policy})
     1.5  
     1.6          devid = blkif.blkdev_name_to_number(dev)
     1.7 +        if not devid:
     1.8 +            raise VmError('Unable to find number for device (%s)' % (dev))
     1.9 +
    1.10          front = { 'virtual-device' : "%i" % devid,
    1.11                    'device-type' : dev_type
    1.12                  }