Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965014AbbKCUXZ (ORCPT ); Tue, 3 Nov 2015 15:23:25 -0500 Received: from mga03.intel.com ([134.134.136.65]:1240 "EHLO mga03.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S964827AbbKCUXN (ORCPT ); Tue, 3 Nov 2015 15:23:13 -0500 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.20,239,1444719600"; d="scan'208";a="677670223" From: Octavian Purdila To: linux-arch@vger.kernel.org Cc: linux-kernel@vger.kernel.org, thehajime@gmail.com, Octavian Purdila Subject: [RFC PATCH 12/28] init: allow architecture code to overide run_init_process Date: Tue, 3 Nov 2015 22:20:43 +0200 Message-Id: <1446582059-17355-13-git-send-email-octavian.purdila@intel.com> X-Mailer: git-send-email 2.1.0 In-Reply-To: <1446582059-17355-1-git-send-email-octavian.purdila@intel.com> References: <1446582059-17355-1-git-send-email-octavian.purdila@intel.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1103 Lines: 37 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 --- 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 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/