[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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



# 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


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.