summaryrefslogtreecommitdiff
path: root/kexec/arch/mips/kexec-mips.c
diff options
context:
space:
mode:
authorYouling Tang <tangyouling@loongson.cn>2021-02-24 13:29:41 +0800
committerSimon Horman <horms@verge.net.au>2021-04-02 11:55:20 +0200
commit15ee19f187ecbe43a2fad0834b91b0d70c413852 (patch)
tree4d3492c8922cb4029c1933753ad8f414b6b088f1 /kexec/arch/mips/kexec-mips.c
parentb4feb36985d76ef7f4c74a7c51f4843c71c728e8 (diff)
mips: Add '--reuse-cmdline' optional parameter support
This patch adds an option "--reuse-cmdline" for people that are lazy in typing --append="$(cat /proc/cmdline)", which will directly use the command line of the currently running system. Signed-off-by: Youling Tang <tangyouling@loongson.cn> Signed-off-by: Simon Horman <horms@verge.net.au>
Diffstat (limited to 'kexec/arch/mips/kexec-mips.c')
-rw-r--r--kexec/arch/mips/kexec-mips.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/kexec/arch/mips/kexec-mips.c b/kexec/arch/mips/kexec-mips.c
index 415c2ed..a9c6a09 100644
--- a/kexec/arch/mips/kexec-mips.c
+++ b/kexec/arch/mips/kexec-mips.c
@@ -89,6 +89,7 @@ void arch_usage(void)
" --append=STRING Set the kernel command line to STRING.\n"
" --dtb=FILE Use FILE as the device tree blob.\n"
" --initrd=FILE Use FILE as initial ramdisk.\n"
+ " --reuse-cmdline Use kernel command line from running system.\n"
);
}
@@ -115,6 +116,9 @@ int arch_process_options(int argc, char **argv)
case OPT_APPEND:
arch_options.command_line = optarg;
break;
+ case OPT_REUSE_CMDLINE:
+ arch_options.command_line = get_command_line();
+ break;
case OPT_DTB:
arch_options.dtb_file = optarg;
break;