Skip to contentSkip to conversation

Add syntax checking for xm block-attach

PATCH Applied Masaki Kanno 2 participants 4 messages Sep 11, 2006 – Sep 14, 2006

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Add syntax checking for xm block-attach

Hi,

This patch adds syntax checking for "xm block-attach" command. I reflected your comments.

Best regards,
Kan

tools/python/xen/xend/server/blkif.py +5 -1
diff -r 1de184deaa9c tools/python/xen/xend/server/blkif.py
@@ -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():

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel

#1 lore raw

Re: [PATCH][RESEND*2] Add syntax checking for xmblock-attach

Hi Ewan,

Do you have any comment? If you don't have comment, could you commit this patch?

http://lists.xensource.com/archives/html/xen-devel/2006-09/msg00290.html

Best regards,
Kan

Quoted 16 lines

Hi,

This patch adds syntax checking for "xm block-attach" command. I reflected your comments.

Best regards,
Kan

-------------------------------text/plain-------------------------------
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel