[PATCH] init/main: Log init process file name

From: Paul Menzel
Date: Fri Jul 13 2018 - 11:23:47 EST


Date: Fri, 13 Jul 2018 15:52:35 +0200

Add a log message to `run_init_process()`.

This log message serves two purposes.

1. If the init process is not specified on the Linux Kernel command
line, the user sees, what file was chosen.

2. The time stamps shows exactly, when the Linux kernel handed over
control to the init process.

Signed-off-by: Paul Menzel <pmenzel@xxxxxxxxxxxxx>
---
Ingo, hopefully itâs fine, putting you in Cc. I do not know, who the
right person is.

init/main.c | 2 ++
1 file changed, 2 insertions(+)

diff --git a/init/main.c b/init/main.c
index 3b4ada11ed52..3821bb55c787 100644
--- a/init/main.c
+++ b/init/main.c
@@ -1001,6 +1001,8 @@ void __init load_default_modules(void)
static int run_init_process(const char *init_filename)
{
argv_init[0] = init_filename;
+
+ pr_info("Run %s as init process\n", init_filename);
return do_execve(getname_kernel(init_filename),
(const char __user *const __user *)argv_init,
(const char __user *const __user *)envp_init);
--
2.17.1

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature