WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

[Xen-devel] [PATCH][VT]fix an issue for passing arguement from control p

To: "xen-devel" <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: [Xen-devel] [PATCH][VT]fix an issue for passing arguement from control panel to deivce model
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
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-devel] [PATCH][VT]fix an issue for passing arguement from control panel to deivce model, Ling, Xiaofeng <=