ia64/xen-unstable

changeset 7487:5a7baecb1c70

Fix an issue for passing arguement from control panel to deivce model
for some arguemnt like 'localtime', 'isa', device model need an argument
"-localtime", instead of "-localtime 1"
Signed-off-by: Xiaofeng Ling <xiaofeng.ling@intel.com>
author kaf24@firebug.cl.cam.ac.uk
date Sun Oct 23 16:51:47 2005 +0100 (2005-10-23)
parents e398a9797c4c
children 2c0b3b807756
files tools/python/xen/xend/image.py
line diff
     1.1 --- a/tools/python/xen/xend/image.py	Sun Oct 23 11:51:15 2005 +0100
     1.2 +++ b/tools/python/xen/xend/image.py	Sun Oct 23 16:51:47 2005 +0100
     1.3 @@ -243,11 +243,12 @@ class VmxImageHandler(ImageHandler):
     1.4              # Handle booleans gracefully
     1.5              if a in ['localtime', 'std-vga', 'isa', 'nic-ne2000']:
     1.6                  if v != None: v = int(v)
     1.7 -
     1.8 +                if v: ret.append("-%s" % a)
     1.9 +            else:
    1.10 +                if v:
    1.11 +                    ret.append("-%s" % a)
    1.12 +                    ret.append("%s" % v)
    1.13              log.debug("args: %s, val: %s" % (a,v))
    1.14 -            if v: 
    1.15 -                ret.append("-%s" % a)
    1.16 -                ret.append("%s" % v)
    1.17  
    1.18          # Handle disk/network related options
    1.19          for (name, info) in deviceConfig: