From mboxrd@z Thu Jan 1 00:00:00 1970 From: Xiaofeng Ling Subject: [PATCH][VT]value is not needed for some device model paramters Date: Mon, 05 Sep 2005 12:13:41 +0800 Message-ID: <431BC5F5.50209@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Return-path: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Ian Pratt , Keir Fraser Cc: xen-devel List-Id: xen-devel@lists.xenproject.org for device mode parameter:std-vga, localtime, isa, value is not needed. Signed-off-by: Xiaofeng Ling Signed-off-by: Arun Sharma diff -r 2be69124cb06 -r c5ba8748d09c tools/python/xen/xend/image.py --- a/tools/python/xen/xend/image.py Mon Sep 5 03:56:13 2005 +++ b/tools/python/xen/xend/image.py Mon Sep 5 03:56:22 2005 @@ -338,12 +338,16 @@ # Handle booleans gracefully if a in ['localtime', 'std-vga', 'isa']: - if v != None: v = int(v) - - log.debug("args: %s, val: %s" % (a,v)) - if v: - ret.append("-%s" % a) - ret.append("%s" % v) + 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)) + # Handle disk/network related options devices = sxp.children(self.vm.config, 'device')