ia64/xen-unstable

changeset 9883:f06b6db6823d

The bootloader code doesn't actually have to deal with the vcpu config
anymore as that's just in the domaininfo. So stop doing so.

Signed-off-by: Jeremy Katz <katzj@redhat.com>
author kaf24@firebug.cl.cam.ac.uk
date Fri Apr 28 14:09:35 2006 +0100 (2006-04-28)
parents a8cac38001ca
children 268e45409ecd
files tools/python/xen/xend/XendBootloader.py tools/python/xen/xend/XendDomainInfo.py tools/python/xen/xm/create.py
line diff
     1.1 --- a/tools/python/xen/xend/XendBootloader.py	Fri Apr 28 14:08:40 2006 +0100
     1.2 +++ b/tools/python/xen/xend/XendBootloader.py	Fri Apr 28 14:09:35 2006 +0100
     1.3 @@ -19,13 +19,12 @@ import sxp
     1.4  from XendLogging import log
     1.5  from XendError import VmError
     1.6  
     1.7 -def bootloader(blexec, disk, quiet = 0, vcpus = None, entry = None):
     1.8 +def bootloader(blexec, disk, quiet = 0, entry = None):
     1.9      """Run the boot loader executable on the given disk and return a
    1.10      config image.
    1.11      @param blexec  Binary to use as the boot loader
    1.12      @param disk Disk to run the boot loader on.
    1.13      @param quiet Run in non-interactive mode, just booting the default.
    1.14 -    @param vcpus Number of vcpus for the domain.
    1.15      @param entry Default entry to boot."""
    1.16      
    1.17      if not os.access(blexec, os.X_OK):
    1.18 @@ -87,9 +86,4 @@ def bootloader(blexec, disk, quiet = 0, 
    1.19      pin = sxp.Parser()
    1.20      pin.input(ret)
    1.21      pin.input_eof()
    1.22 -
    1.23 -    config_image = pin.val
    1.24 -    if vcpus and sxp.child_value(config_image, "vcpus") is None:
    1.25 -        config_image.append(['vcpus', vcpus])
    1.26 -
    1.27 -    return config_image
    1.28 +    return pin.val
     2.1 --- a/tools/python/xen/xend/XendDomainInfo.py	Fri Apr 28 14:08:40 2006 +0100
     2.2 +++ b/tools/python/xen/xend/XendDomainInfo.py	Fri Apr 28 14:09:35 2006 +0100
     2.3 @@ -1619,8 +1619,7 @@ class XendDomainInfo:
     2.4              if disk is None:
     2.5                  continue
     2.6              fn = blkdev_uname_to_file(sxp.child_value(disk, "uname"))
     2.7 -            blcfg = bootloader(self.info['bootloader'], fn, 1,
     2.8 -                               self.info['vcpus'])
     2.9 +            blcfg = bootloader(self.info['bootloader'], fn, 1)
    2.10          if blcfg is None:
    2.11              msg = "Had a bootloader specified, but can't find disk"
    2.12              log.error(msg)
     3.1 --- a/tools/python/xen/xm/create.py	Fri Apr 28 14:08:40 2006 +0100
     3.2 +++ b/tools/python/xen/xm/create.py	Fri Apr 28 14:09:35 2006 +0100
     3.3 @@ -623,7 +623,7 @@ def run_bootloader(vals):
     3.4      file = blkif.blkdev_uname_to_file(uname)
     3.5  
     3.6      return bootloader(vals.bootloader, file, not vals.console_autoconnect,
     3.7 -                      vals.vcpus, vals.bootentry)
     3.8 +                      vals.bootentry)
     3.9  
    3.10  def make_config(vals):
    3.11      """Create the domain configuration.