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][RESEND] improve disk mode error

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] [PATCH][RESEND] improve disk mode error
From: John Levon <levon@xxxxxxxxxxxxxxxxx>
Date: Tue, 31 Oct 2006 13:30:04 +0000
Delivery-date: Thu, 02 Nov 2006 13:51:05 -0800
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][RESEND] improve disk mode error, John Levon <=