summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--kexec/arch/loongarch/kexec-loongarch.c2
-rw-r--r--kexec/kexec.c2
-rw-r--r--kexec/kexec.h1
3 files changed, 4 insertions, 1 deletions
diff --git a/kexec/arch/loongarch/kexec-loongarch.c b/kexec/arch/loongarch/kexec-loongarch.c
index 3fdba01f..4c7361ca 100644
--- a/kexec/arch/loongarch/kexec-loongarch.c
+++ b/kexec/arch/loongarch/kexec-loongarch.c
@@ -219,6 +219,8 @@ int arch_process_options(int argc, char **argv)
break;
case OPT_REUSE_CMDLINE:
cmdline = get_command_line();
+ remove_parameter(cmdline, "kexec");
+ remove_parameter(cmdline, "initrd");
break;
case OPT_INITRD:
arch_options.initrd_file = optarg;
diff --git a/kexec/kexec.c b/kexec/kexec.c
index 829a6eac..0e92d967 100644
--- a/kexec/kexec.c
+++ b/kexec/kexec.c
@@ -1095,7 +1095,7 @@ static int k_status(unsigned long kexec_flags)
/*
* Remove parameter from a kernel command line. Helper function by get_command_line().
*/
-static void remove_parameter(char *line, const char *param_name)
+void remove_parameter(char *line, const char *param_name)
{
char *start, *end;
diff --git a/kexec/kexec.h b/kexec/kexec.h
index 8a056447..0d820ada 100644
--- a/kexec/kexec.h
+++ b/kexec/kexec.h
@@ -304,6 +304,7 @@ int arch_compat_trampoline(struct kexec_info *info);
void arch_update_purgatory(struct kexec_info *info);
int is_crashkernel_mem_reserved(void);
int get_crash_kernel_load_range(uint64_t *start, uint64_t *end);
+void remove_parameter(char *line, const char *param_name);
char *get_command_line(void);
int kexec_iomem_for_each_line(char *match,