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>
This commit is contained in:
Keir Fraser committed 2009-06-17 07:37:26 +01:00
1 parent ce004c4b0f
commit 63524b0e43
2 files changed
+1 -2

No files matched your search

+1 -1
View File
@@ -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'))
-1
View File
@@ -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):
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.