|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen-unstable] pygrub: always append --args
# HG changeset patch
# User Olaf Hering <olaf@xxxxxxxxx>
# Date 1348567431 -3600
# Node ID 795c493fe561040805385ef792e6afd6db2cd7ea
# Parent c8d65d91a6f20fa7fae905bbf172e59b335d6371
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 <olaf@xxxxxxxxx>
Acked-by: Ian Campbell <ian.campbell@xxxxxxxxxx>
Committed-by: Ian Campbell <ian.campbell@xxxxxxxxxx>
---
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
_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |