summaryrefslogtreecommitdiff
path: root/kexec/kexec.c
diff options
context:
space:
mode:
authorBernhard Walle <bwalle@suse.de>2008-06-12 18:10:25 +0200
committerSimon Horman <horms@verge.net.au>2008-06-13 12:11:48 +1000
commit7d982ee8d961c1fc03a914ae9508c997f2cfde9d (patch)
tree874bedae44bbd1c490efbe1db4b2f51426c48d5b /kexec/kexec.c
parent0f0a2228f79106e8d003147cec71a7dd608d4f49 (diff)
Fix wrong remove_parameter() calls
When --reuse-cmdline is specified, kexec automatically removes some command line parameter that are *known* to break the kexec'd target. That patch corrects that behaviour: 1. BOOT_IMAGE should be removed always when --reuse-cmdline is specified since it's likely that the kernel is not the same as the running kernel. As only lilo-like bootloaders (i.e. not GRUB) adds that parameter, there's no need to add a BOOT_IMAGE here. 2. crashkernel should be only removed when 'kexec -p' is called. For the normal kexec, the crashkernel parameter can be passed as in the running kernel. The mistake has been introduced by commit 3c5bb06948881b3e31c783c19edef74275794280 by myself. Signed-off-by: Bernhard Walle <bwalle@suse.de> Signed-off-by: Simon Horman <horms@verge.net.au>
Diffstat (limited to 'kexec/kexec.c')
-rw-r--r--kexec/kexec.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/kexec/kexec.c b/kexec/kexec.c
index 1550d68..b831775 100644
--- a/kexec/kexec.c
+++ b/kexec/kexec.c
@@ -869,9 +869,9 @@ char *get_command_line(void)
/* strip newline */
*(line + strlen(line) - 1) = 0;
- remove_parameter(line, "crashkernel");
+ remove_parameter(line, "BOOT_IMAGE");
if (kexec_flags & KEXEC_ON_CRASH)
- remove_parameter(line, "BOOT_IMAGE");
+ remove_parameter(line, "crashkernel");
} else
line = strdup("");