mirror of
https://github.com/xen-project/xen.git
synced 2026-10-29 02:30:03 +01:00
[XEND] Improve error message for unparsed disk modes.
Signed-off-by: John Levon <john.levon@sun.com>
This commit is contained in:
1 parent
9e0d4d34f3
commit
f0d0046d31
1 file changed
+5
-1
@@ -66,7 +66,11 @@ class BlkifController(DevController):
|
||||
|
||||
mode = sxp.child_value(config, 'mode', 'r')
|
||||
if mode not in ('r', 'w', 'w!'):
|
||||
raise VmError('Invalid mode')
|
||||
name = uname
|
||||
if not name:
|
||||
name = sxp.child_value(config, 'dev')
|
||||
raise VmError('Invalid mode \'%s\' for %s. Valid modes are '
|
||||
'{r,w,w!}' % (mode, name))
|
||||
|
||||
back = { 'dev' : dev,
|
||||
'type' : typ,
|
||||
|
||||