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:
Ewan Mellor committed 2006-09-14 07:55:28 +01:00
1 parent 9a6d1bcab3
commit bf510c7f4c
1 file changed
+5 -1
+5 -1
View File
@@ -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():
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.