direct-io.hg

changeset 12051:90164f5fbd50

[XEND] Improve error message for unparsed disk modes.
Signed-off-by: John Levon <john.levon@sun.com>
author kfraser@localhost.localdomain
date Tue Oct 31 18:24:44 2006 +0000 (2006-10-31)
parents 2db4388fecb9
children 0a3d7dacff4c
files tools/python/xen/xend/server/blkif.py
line diff
     1.1 --- a/tools/python/xen/xend/server/blkif.py	Tue Oct 31 16:42:46 2006 +0000
     1.2 +++ b/tools/python/xen/xend/server/blkif.py	Tue Oct 31 18:24:44 2006 +0000
     1.3 @@ -66,7 +66,11 @@ class BlkifController(DevController):
     1.4  
     1.5          mode = sxp.child_value(config, 'mode', 'r')
     1.6          if mode not in ('r', 'w', 'w!'):
     1.7 -            raise VmError('Invalid mode')
     1.8 +            name = uname
     1.9 +            if not name:
    1.10 +                name = sxp.child_value(config, 'dev')
    1.11 +            raise VmError('Invalid mode \'%s\' for %s. Valid modes are '
    1.12 +            '{r,w,w!}' % (mode, name))
    1.13  
    1.14          back = { 'dev'    : dev,
    1.15                   'type'   : typ,