direct-io.hg

changeset 13334:66eba8d1b83a

[XEND] Device update should handle SXP without 'device' as first
param.

Signed-off-by: Alastair Tse <atse@xensource.com>
author Alastair Tse <atse@xensource.com>
date Thu Jan 11 17:03:11 2007 +0000 (2007-01-11)
parents bf605c314a91
children f455a26a4170
files tools/python/xen/xend/XendConfig.py
line diff
     1.1 --- a/tools/python/xen/xend/XendConfig.py	Thu Jan 11 16:36:46 2007 +0000
     1.2 +++ b/tools/python/xen/xend/XendConfig.py	Thu Jan 11 17:03:11 2007 +0000
     1.3 @@ -1020,10 +1020,11 @@ class XendConfig(dict):
     1.4          @return: Returns True if succesfully found and updated a device conf
     1.5          """
     1.6          if dev_uuid in self['devices']:
     1.7 -            config = sxp.child0(cfg_sxp)
     1.8 -            dev_type = sxp.name(config)
     1.9 -            dev_info = {}
    1.10 -
    1.11 +            if sxp.child0(cfg_sxp) == 'device':            
    1.12 +                config = sxp.child0(cfg_sxp)
    1.13 +            else:
    1.14 +                config = cfg_sxp
    1.15 +                
    1.16              for opt_val in config[1:]:
    1.17                  try:
    1.18                      opt, val = opt_val