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

[Xen-changelog] Fix an issue for passing arguement from control panel to deivce model



# HG changeset patch
# User kaf24@xxxxxxxxxxxxxxxxxxxx
# Node ID 5a7baecb1c70a0fb583a87dd9e22858e541da099
# Parent  e398a9797c4c6dfccb3f34942e461b02cc6f6e43
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@xxxxxxxxx>

diff -r e398a9797c4c -r 5a7baecb1c70 tools/python/xen/xend/image.py
--- a/tools/python/xen/xend/image.py    Sun Oct 23 10:51:15 2005
+++ b/tools/python/xen/xend/image.py    Sun Oct 23 15:51:47 2005
@@ -243,11 +243,12 @@
             # Handle booleans gracefully
             if a in ['localtime', 'std-vga', 'isa', 'nic-ne2000']:
                 if v != None: v = int(v)
-
+                if v: ret.append("-%s" % a)
+            else:
+                if v:
+                    ret.append("-%s" % a)
+                    ret.append("%s" % v)
             log.debug("args: %s, val: %s" % (a,v))
-            if v: 
-                ret.append("-%s" % a)
-                ret.append("%s" % v)
 
         # Handle disk/network related options
         for (name, info) in deviceConfig:

_______________________________________________
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®.