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

[Xen-changelog] [xen-unstable] [XEND] Improve error message for unparsed disk modes.



# HG changeset patch
# User kfraser@xxxxxxxxxxxxxxxxxxxxx
# Node ID 90164f5fbd5006a9c3dbc33c3795dbe24be20da2
# Parent  2db4388fecb9d08fa2a435d2bfcc3026fb14f218
[XEND] Improve error message for unparsed disk modes.
Signed-off-by: John Levon <john.levon@xxxxxxx>
---
 tools/python/xen/xend/server/blkif.py |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletion(-)

diff -r 2db4388fecb9 -r 90164f5fbd50 tools/python/xen/xend/server/blkif.py
--- a/tools/python/xen/xend/server/blkif.py     Tue Oct 31 16:42:46 2006 +0000
+++ b/tools/python/xen/xend/server/blkif.py     Tue Oct 31 18:24:44 2006 +0000
@@ -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-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

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