direct-io.hg

changeset 14988:476efa5c9abf

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>
author kfraser@localhost.localdomain
date Tue May 01 10:15:08 2007 +0100 (2007-05-01)
parents 5b4a02335182
children 1cfe47358f9f
files tools/python/xen/xend/XendConfig.py
line diff
     1.1 --- a/tools/python/xen/xend/XendConfig.py	Tue May 01 10:08:36 2007 +0100
     1.2 +++ b/tools/python/xen/xend/XendConfig.py	Tue May 01 10:15:08 2007 +0100
     1.3 @@ -988,19 +988,16 @@ class XendConfig(dict):
     1.4                  if param not in target:
     1.5                      target[param] = []
     1.6                  if dev_uuid not in target[param]:
     1.7 -                    if dev_type == 'vbd' and not target[param]:
     1.8 -                        # Compat hack -- this is the first disk, so mark it
     1.9 -                        # bootable.
    1.10 -                        dev_info['bootable'] = 1
    1.11 +                    if dev_type == 'vbd':
    1.12 +                        # Compat hack -- mark first disk bootable
    1.13 +                        dev_info['bootable'] = int(not target[param])
    1.14                      target[param].append(dev_uuid)
    1.15              elif dev_type == 'tap':
    1.16                  if 'vbd_refs' not in target:
    1.17                      target['vbd_refs'] = []
    1.18                  if dev_uuid not in target['vbd_refs']:
    1.19 -                    if not target['vbd_refs']:
    1.20 -                        # Compat hack -- this is the first disk, so mark it
    1.21 -                        # bootable.
    1.22 -                        dev_info['bootable'] = 1
    1.23 +                    # Compat hack -- mark first disk bootable
    1.24 +                    dev_info['bootable'] = int(not target['vbd_refs'])
    1.25                      target['vbd_refs'].append(dev_uuid)
    1.26                      
    1.27              elif dev_type == 'vfb':