ia64/xen-unstable

changeset 19235:596f21d901f3

pygrub: parse xen module option in grub

Add function for GrubConf to parse xen module option in grub.
Pygrub should pass args as domUloader did.

Signed-off-by: Wei Kong <weikong.cn@gmail.com>
author Keir Fraser <keir.fraser@citrix.com>
date Fri Feb 20 11:08:31 2009 +0000 (2009-02-20)
parents 4771bceb1889
children 9559343fe5e8
files tools/pygrub/src/pygrub
line diff
     1.1 --- a/tools/pygrub/src/pygrub	Fri Feb 20 11:05:17 2009 +0000
     1.2 +++ b/tools/pygrub/src/pygrub	Fri Feb 20 11:08:31 2009 +0000
     1.3 @@ -501,7 +501,7 @@ def get_entry_idx(cf, entry):
     1.4  
     1.5      return None
     1.6  
     1.7 -def run_grub(file, entry, fs):
     1.8 +def run_grub(file, entry, fs, arg):
     1.9      global g
    1.10      global sel
    1.11  
    1.12 @@ -534,7 +534,7 @@ def run_grub(file, entry, fs):
    1.13      if img.initrd:
    1.14          grubcfg["ramdisk"] = img.initrd[1]
    1.15      if img.args:
    1.16 -        grubcfg["args"] = img.args
    1.17 +        grubcfg["args"] = img.args + " " + arg
    1.18  
    1.19      return grubcfg
    1.20  
    1.21 @@ -659,7 +659,7 @@ if __name__ == "__main__":
    1.22      chosencfg = sniff_solaris(fs, incfg)
    1.23  
    1.24      if not chosencfg["kernel"]:
    1.25 -        chosencfg = run_grub(file, entry, fs)
    1.26 +        chosencfg = run_grub(file, entry, fs, incfg["args"])
    1.27  
    1.28      data = fs.open_file(chosencfg["kernel"]).read()
    1.29      (tfd, bootcfg["kernel"]) = tempfile.mkstemp(prefix="boot_kernel.",