mirror of
https://github.com/xen-project/xen.git
synced 2026-10-29 18:50:05 +01:00
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:
1 parent
ce004c4b0f
commit
63524b0e43
2 files changed
+1
-2
No files matched your search
@@ -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'))
|
||||
|
||||
@@ -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):
|
||||
|
||||