diff options
author | kfraser@localhost.localdomain <kfraser@localhost.localdomain> | 2007-05-01 10:15:08 +0100 |
---|---|---|
committer | kfraser@localhost.localdomain <kfraser@localhost.localdomain> | 2007-05-01 10:15:08 +0100 |
commit | dc8f50b150be1b7189114cf1305827f8c5b21f0e (patch) | |
tree | 3964e92e0425002adab9eb969516863cdb3caebe | |
parent | e1064ed49951c18d968e957aed56a177b4150dcd (diff) | |
download | xen-dc8f50b150be1b7189114cf1305827f8c5b21f0e.tar.gz xen-dc8f50b150be1b7189114cf1305827f8c5b21f0e.tar.bz2 xen-dc8f50b150be1b7189114cf1305827f8c5b21f0e.zip |
xend: Ensure bootable flag is set in internal xend config for tap
devices.
Original patch by: Jim Fehlig <jfehlig@novell.com>
Signed-off-by: Keir Fraser <keir@xensource.com>
-rw-r--r-- | tools/python/xen/xend/XendConfig.py | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/tools/python/xen/xend/XendConfig.py b/tools/python/xen/xend/XendConfig.py index 6ced067f7b..14e0444df8 100644 --- a/tools/python/xen/xend/XendConfig.py +++ b/tools/python/xen/xend/XendConfig.py @@ -988,19 +988,16 @@ class XendConfig(dict): if param not in target: target[param] = [] if dev_uuid not in target[param]: - if dev_type == 'vbd' and not target[param]: - # Compat hack -- this is the first disk, so mark it - # bootable. - dev_info['bootable'] = 1 + if dev_type == 'vbd': + # Compat hack -- mark first disk bootable + dev_info['bootable'] = int(not target[param]) target[param].append(dev_uuid) elif dev_type == 'tap': if 'vbd_refs' not in target: target['vbd_refs'] = [] if dev_uuid not in target['vbd_refs']: - if not target['vbd_refs']: - # Compat hack -- this is the first disk, so mark it - # bootable. - dev_info['bootable'] = 1 + # Compat hack -- mark first disk bootable + dev_info['bootable'] = int(not target['vbd_refs']) target['vbd_refs'].append(dev_uuid) elif dev_type == 'vfb': |