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-changelog

[Xen-changelog] [xen-unstable] xend: pass-through: Use generic code in p

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] xend: pass-through: Use generic code in pci_opts_list_to_sxp()
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Fri, 19 Jun 2009 00:56:12 -0700
Delivery-date: Fri, 19 Jun 2009 01:03:38 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1245220646 -3600
# Node ID bc7715954087610d71e3da26dfd9721d00c25c30
# Parent  a4036225c1688a99cddba4e3b7cdbea0326757c9
xend: pass-through: Use generic code in pci_opts_list_to_sxp()

Use dev_dict_to_sxp() inside pci_opts_list_to_sxp() now that it is
available.

Signed-off-by: Simon Horman <horms@xxxxxxxxxxxx>
---
 tools/python/xen/util/pci.py        |    2 +-
 tools/python/xen/xend/XendSXPDev.py |    1 -
 2 files changed, 1 insertion(+), 2 deletions(-)

diff -r a4036225c168 -r bc7715954087 tools/python/xen/util/pci.py
--- a/tools/python/xen/util/pci.py      Wed Jun 17 07:36:47 2009 +0100
+++ b/tools/python/xen/util/pci.py      Wed Jun 17 07:37:26 2009 +0100
@@ -136,7 +136,7 @@ def split_pci_opts(opts):
                filter(lambda x: x != '', opts.split(',')))
 
 def pci_opts_list_to_sxp(list):
-    return ['dev'] + map(lambda x: ['opts', x], list)
+    return dev_dict_to_sxp({'opts': list})
 
 def pci_opts_list_from_sxp(dev):
     return map(lambda x: sxp.children(x)[0], sxp.children(dev, 'opts'))
diff -r a4036225c168 -r bc7715954087 tools/python/xen/xend/XendSXPDev.py
--- a/tools/python/xen/xend/XendSXPDev.py       Wed Jun 17 07:36:47 2009 +0100
+++ b/tools/python/xen/xend/XendSXPDev.py       Wed Jun 17 07:37:26 2009 +0100
@@ -4,7 +4,6 @@
 
 import types
 
-# This includes a generic equivalent of pci_opts_list_to_sxp()
 def dev_dict_to_sxp(dev):
     def f((key, val)):
         if isinstance(val, types.ListType):

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] xend: pass-through: Use generic code in pci_opts_list_to_sxp(), Xen patchbot-unstable <=