lkml.org 
[lkml]   [2015]   [Nov]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[RFC PATCH 12/28] init: allow architecture code to overide run_init_process
Date
This is needed for arch/lkl where where execve can not be implemented
and init only runs in kernel space.

Signed-off-by: Octavian Purdila <octavian.purdila@intel.com>
---
init/main.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/init/main.c b/init/main.c
index 9e64d70..efd8f7c 100644
--- a/init/main.c
+++ b/init/main.c
@@ -905,13 +905,15 @@ void __init load_default_modules(void)
load_default_elevator_module();
}

-static int run_init_process(const char *init_filename)
+#ifndef ARCH_RUN_INIT_PROCESS
+int run_init_process(const char *init_filename)
{
argv_init[0] = init_filename;
return do_execve(getname_kernel(init_filename),
(const char __user *const __user *)argv_init,
(const char __user *const __user *)envp_init);
}
+#endif

static int try_to_run_init_process(const char *init_filename)
{
--
2.1.0


\
 
 \ /
  Last update: 2015-11-03 21:41    [W:0.155 / U:0.072 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site