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

[Xen-changelog] [xen-unstable] xend: pass-through: Use generic code in pci_opts_list_to_sxp()



# 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


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.