mirror of
https://github.com/xen-project/xen.git
synced 2026-10-29 10:40:03 +01:00
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>
This commit is contained in:
1 parent
6b24e654ee
commit
f652cfbe00
1 file changed
+3
@@ -80,6 +80,9 @@ class BlkifController(DevController):
|
||||
'acm_policy' : policy})
|
||||
|
||||
devid = blkif.blkdev_name_to_number(dev)
|
||||
if not devid:
|
||||
raise VmError('Unable to find number for device (%s)' % (dev))
|
||||
|
||||
front = { 'virtual-device' : "%i" % devid,
|
||||
'device-type' : dev_type
|
||||
}
|
||||
|
||||