mirror of
https://github.com/xen-project/xen.git
synced 2026-10-29 02:30:03 +01:00
This patch adds syntax checking for "xm block-attach" command.
Signed-off-by: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
This commit is contained in:
1 parent
9a6d1bcab3
commit
bf510c7f4c
1 file changed
+5
-1
@@ -64,10 +64,14 @@ class BlkifController(DevController):
|
||||
except ValueError:
|
||||
(typ, params) = ("", "")
|
||||
|
||||
mode = sxp.child_value(config, 'mode', 'r')
|
||||
if mode not in ('r', 'w', 'w!'):
|
||||
raise VmError('Invalid mode')
|
||||
|
||||
back = { 'dev' : dev,
|
||||
'type' : typ,
|
||||
'params' : params,
|
||||
'mode' : sxp.child_value(config, 'mode', 'r')
|
||||
'mode' : mode
|
||||
}
|
||||
|
||||
if security.on():
|
||||
|
||||