ia64/xen-unstable

changeset 19779:bc7715954087

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@verge.net.au>
author Keir Fraser <keir.fraser@citrix.com>
date Wed Jun 17 07:37:26 2009 +0100 (2009-06-17)
parents a4036225c168
children d8b2b1712ea6
files tools/python/xen/util/pci.py tools/python/xen/xend/XendSXPDev.py
line diff
     1.1 --- a/tools/python/xen/util/pci.py	Wed Jun 17 07:36:47 2009 +0100
     1.2 +++ b/tools/python/xen/util/pci.py	Wed Jun 17 07:37:26 2009 +0100
     1.3 @@ -136,7 +136,7 @@ def split_pci_opts(opts):
     1.4                 filter(lambda x: x != '', opts.split(',')))
     1.5  
     1.6  def pci_opts_list_to_sxp(list):
     1.7 -    return ['dev'] + map(lambda x: ['opts', x], list)
     1.8 +    return dev_dict_to_sxp({'opts': list})
     1.9  
    1.10  def pci_opts_list_from_sxp(dev):
    1.11      return map(lambda x: sxp.children(x)[0], sxp.children(dev, 'opts'))
     2.1 --- a/tools/python/xen/xend/XendSXPDev.py	Wed Jun 17 07:36:47 2009 +0100
     2.2 +++ b/tools/python/xen/xend/XendSXPDev.py	Wed Jun 17 07:37:26 2009 +0100
     2.3 @@ -4,7 +4,6 @@
     2.4  
     2.5  import types
     2.6  
     2.7 -# This includes a generic equivalent of pci_opts_list_to_sxp()
     2.8  def dev_dict_to_sxp(dev):
     2.9      def f((key, val)):
    2.10          if isinstance(val, types.ListType):