diff --git a/25941-pygrub_always_append_--args.patch b/25941-pygrub_always_append_--args.patch new file mode 100644 index 0000000..9161b54 --- /dev/null +++ b/25941-pygrub_always_append_--args.patch @@ -0,0 +1,44 @@ +changeset: 25941:795c493fe561 +user: Olaf Hering +date: Tue Sep 25 11:03:51 2012 +0100 +files: tools/pygrub/src/pygrub +description: +pygrub: always append --args + +If a bootloader entry in menu.lst has no additional kernel command line +options listed and the domU.cfg has 'bootargs="--args=something"' the +additional arguments from the config file are not passed to the kernel. +The reason for that incorrect behaviour is that run_grub appends arg +only if the parsed config file has arguments listed. + +Fix this by appending args from image section and the config file separatly. +To avoid adding to a NoneType initialize grubcfg['args'] to an empty string. +This does not change behaviour but simplifies the code which appends the +string. + +Signed-off-by: Olaf Hering +Acked-by: Ian Campbell +Committed-by: Ian Campbell + + +diff -r c8d65d91a6f2 -r 795c493fe561 tools/pygrub/src/pygrub +--- a/tools/pygrub/src/pygrub Tue Sep 25 08:38:14 2012 +0200 ++++ b/tools/pygrub/src/pygrub Tue Sep 25 11:03:51 2012 +0100 +@@ -615,13 +615,15 @@ def run_grub(file, entry, fs, arg): + except IndexError: + img = g.cf.images[0] + +- grubcfg = { "kernel": None, "ramdisk": None, "args": None } ++ grubcfg = { "kernel": None, "ramdisk": None, "args": "" } + + grubcfg["kernel"] = img.kernel[1] + if img.initrd: + grubcfg["ramdisk"] = img.initrd[1] + if img.args: +- grubcfg["args"] = img.args + " " + arg ++ grubcfg["args"] += img.args ++ if arg: ++ grubcfg["args"] += " " + args + + return grubcfg + diff --git a/xen.changes b/xen.changes index d965a26..dcab324 100644 --- a/xen.changes +++ b/xen.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Tue Sep 25 14:24:29 CEST 2012 - ohering@suse.de + +- pygrub: always append --args + 25941-pygrub_always_append_--args.patch + ------------------------------------------------------------------- Mon Sep 24 16:41:58 CEST 2012 - ohering@suse.de diff --git a/xen.spec b/xen.spec index a9462f1..77256e9 100644 --- a/xen.spec +++ b/xen.spec @@ -185,6 +185,7 @@ Patch25866: 25866-sercon-ns16550-pci-irq.patch Patch25867: 25867-sercon-ns16550-parse.patch Patch25874: 25874-x86-EFI-chain-cfg.patch Patch25909: 25909-xenpm-consistent.patch +Patch25941: 25941-pygrub_always_append_--args.patch # Upstream qemu patches # Our patches Patch301: xend-config.diff @@ -668,6 +669,7 @@ tar xfj %{SOURCE6} -C $RPM_BUILD_DIR/%{xen_build_dir}/tools %patch25867 -p1 %patch25874 -p1 %patch25909 -p1 +%patch25941 -p1 # Qemu # Our patches %patch301 -p1