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-devel

[Xen-devel] [PATCH] Improve error message for disk modes.

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] [PATCH] Improve error message for disk modes.
From: John Levon <levon@xxxxxxxxxxxxxxxxx>
Date: Wed, 25 Oct 2006 16:12:20 +0100
Delivery-date: Wed, 25 Oct 2006 08:12:16 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mutt/1.5.9i
# HG changeset patch
# User john.levon@xxxxxxx
# Date 1161789049 25200
# Node ID 47e8d46c8a4118db484830de9ffdbc56c297f19a
# Parent  1f839a3d365e0bc9d0a76699ff193401f7b4f090
Improve error message for disk modes.

Signed-off-by: John Levon <john.levon@xxxxxxx>

diff --git a/tools/python/xen/xend/server/blkif.py 
b/tools/python/xen/xend/server/blkif.py
--- a/tools/python/xen/xend/server/blkif.py
+++ b/tools/python/xen/xend/server/blkif.py
@@ -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,

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-devel] [PATCH] Improve error message for disk modes., John Levon <=