From: Youling Tang <[email protected]>

On the LoongArch architecture, when loading the kernel via kexec_file,
the 'kexec_file'prefix is automatically appended to the command line.
Consequently, if the '--reuse-cmdline' option is used to inherit the
current command line, this prefix must be detected and removed.

Signed-off-by: Youling Tang <[email protected]>
---
 kexec/arch/loongarch/kexec-loongarch.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/kexec/arch/loongarch/kexec-loongarch.c 
b/kexec/arch/loongarch/kexec-loongarch.c
index eb60ef0..240202f 100644
--- a/kexec/arch/loongarch/kexec-loongarch.c
+++ b/kexec/arch/loongarch/kexec-loongarch.c
@@ -260,6 +260,7 @@ int arch_process_options(int argc, char **argv)
                case OPT_REUSE_CMDLINE:
                        cmdline = get_command_line();
                        remove_parameter(cmdline, "kexec");
+                       remove_parameter(cmdline, "kexec_file");
                        remove_parameter(cmdline, "initrd");
                        break;
                case OPT_INITRD:
-- 
2.34.1


Reply via email to