WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

[Xen-changelog] [xen-unstable] This patch adds syntax checking for "xm b

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] This patch adds syntax checking for "xm block-attach" command.
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Thu, 14 Sep 2006 08:40:16 +0000
Delivery-date: Thu, 14 Sep 2006 01:40:54 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User Ewan Mellor <ewan@xxxxxxxxxxxxx>
# Node ID 2b8dc69744e3ae99d6c59eab7b229ae4259170e3
# Parent  25ece14b6234eda0e32ef0105654ed82380cbafa
This patch adds syntax checking for "xm block-attach" command.

Signed-off-by: Masaki Kanno <kanno.masaki@xxxxxxxxxxxxxx>
---
 tools/python/xen/xend/server/blkif.py |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletion(-)

diff -r 25ece14b6234 -r 2b8dc69744e3 tools/python/xen/xend/server/blkif.py
--- a/tools/python/xen/xend/server/blkif.py     Thu Sep 14 07:55:27 2006 +0100
+++ b/tools/python/xen/xend/server/blkif.py     Thu Sep 14 07:55:28 2006 +0100
@@ -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-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] This patch adds syntax checking for "xm block-attach" command., Xen patchbot-unstable <=