aboutsummaryrefslogtreecommitdiff
path: root/init
diff options
context:
space:
mode:
authorChristoph Hellwig <[email protected]>2019-05-13 17:18:30 -0700
committerLinus Torvalds <[email protected]>2019-05-14 09:47:47 -0700
commitd8ae8a3765bfa1f9bf977e2496fcc9cf64fbfabd (patch)
tree94345d60244fed8d79a7a5f812df64ac0dfdff3d /init
parentafef7889c480ed134247f16c2ebdeabd75e77fd0 (diff)
initramfs: move the legacy keepinitrd parameter to core code
No need to handle the freeing disable in arch code when we already have a core hook (and a different name for the option) for it. Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Christoph Hellwig <[email protected]> Acked-by: Catalin Marinas <[email protected]> [arm64] Acked-by: Mike Rapoport <[email protected]> Cc: Geert Uytterhoeven <[email protected]> [m68k] Cc: Steven Price <[email protected]> Cc: Alexander Viro <[email protected]> Cc: Guan Xuetao <[email protected]> Cc: Russell King <[email protected]> Cc: Will Deacon <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
Diffstat (limited to 'init')
-rw-r--r--init/initramfs.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/init/initramfs.c b/init/initramfs.c
index 32f940473d67..cb3d17735c66 100644
--- a/init/initramfs.c
+++ b/init/initramfs.c
@@ -513,6 +513,15 @@ static int __init retain_initrd_param(char *str)
}
__setup("retain_initrd", retain_initrd_param);
+#ifdef CONFIG_ARCH_HAS_KEEPINITRD
+static int __init keepinitrd_setup(char *__unused)
+{
+ do_retain_initrd = 1;
+ return 1;
+}
+__setup("keepinitrd", keepinitrd_setup);
+#endif
+
extern char __initramfs_start[];
extern unsigned long __initramfs_size;
#include <linux/initrd.h>