From: Keir Fraser Date: Tue, 16 Jun 2009 09:55:36 +0000 (+0100) Subject: xend: Show "bootable" information only once in 'xm list --long' X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~13784 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=3e71ff4418f6ab1be070f0994bf55d42b3363a52;p=xen.git xend: Show "bootable" information only once in 'xm list --long' Signed-off-by: Masaki Kanno --- diff --git a/tools/python/xen/xend/XendConfig.py b/tools/python/xen/xend/XendConfig.py index 6ac11928f6..87bb3721e0 100644 --- a/tools/python/xen/xend/XendConfig.py +++ b/tools/python/xen/xend/XendConfig.py @@ -1100,12 +1100,11 @@ class XendConfig(dict): configs = controller.configurations(txn) for config in configs: if sxp.name(config) in ('vbd', 'tap'): - # The bootable flag is never written to the - # store as part of the device config. dev_uuid = sxp.child_value(config, 'uuid') dev_type, dev_cfg = self['devices'][dev_uuid] - is_bootable = dev_cfg.get('bootable', 0) - config.append(['bootable', int(is_bootable)]) + if sxp.child_value(config, 'bootable', None) is None: + is_bootable = dev_cfg.get('bootable', 0) + config.append(['bootable', int(is_bootable)]) config.append(['VDI', dev_cfg.get('VDI', '')]) sxpr.append(['device', config])