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

[Xen-devel] [PATCH][VT]fix an issue for passing arguement from control panel to deivce model


  • To: "xen-devel" <xen-devel@xxxxxxxxxxxxxxxxxxx>
  • From: "Ling, Xiaofeng" <xiaofeng.ling@xxxxxxxxx>
  • Date: Sun, 23 Oct 2005 21:47:33 +0800
  • Delivery-date: Sun, 23 Oct 2005 13:44:51 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xensource.com>
  • Thread-index: AcXX2FFlPJgJbiBmRPunPdWl++Uxqg==
  • Thread-topic: [PATCH][VT]fix an issue for passing arguement from control panel to deivce model

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 fced2f5ba647 tools/python/xen/xend/image.py
--- a/tools/python/xen/xend/image.py    Sun Oct 23 21:25:48 2005 +0800
+++ b/tools/python/xen/xend/image.py    Sun Oct 23 21:41:02 2005 +0800
@@ -243,11 +243,13 @@
             # 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:


-------------------
Ling Xiaofeng(Daniel)
Open Source Technology Center
Intel China Software Center
iNet: 8-752-1243
8621-52574545-1243(O)
xfling@xxxxxxxxxxxxxxxxxxxxx

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