aboutsummaryrefslogtreecommitdiff
path: root/init/init.c
diff options
context:
space:
mode:
authorGravatar Denys Vlasenko <vda.linux@googlemail.com>2016-03-31 00:42:57 +0200
committerGravatar Denys Vlasenko <vda.linux@googlemail.com>2016-03-31 00:42:57 +0200
commit52977a7d600c7db0f7c4935fd501427fd6b580d0 (patch)
tree9f5fdb91626f0201118e400cd16a72ce277e7932 /init/init.c
parenta27dc33f976b15ccfe9180d652ed16579638c48c (diff)
downloadbusybox-52977a7d600c7db0f7c4935fd501427fd6b580d0.tar.gz
busybox-52977a7d600c7db0f7c4935fd501427fd6b580d0.tar.bz2
Rename FEATURE_INITRD to LINUXRC and make it separate, not an alias to init
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'init/init.c')
-rw-r--r--init/init.c41
1 files changed, 21 insertions, 20 deletions
diff --git a/init/init.c b/init/init.c
index 25bfaec8c..6eb76b80e 100644
--- a/init/init.c
+++ b/init/init.c
@@ -16,10 +16,21 @@
//config: help
//config: init is the first program run when the system boots.
//config:
+//config:config LINUXRC
+//config: bool "Support running init from within an initrd (not initramfs)"
+//config: default y
+//config: select FEATURE_SYSLOG
+//config: help
+//config: Legacy support for running init under the old-style initrd. Allows
+//config: the name linuxrc to act as init, and it doesn't assume init is PID 1.
+//config:
+//config: This does not apply to initramfs, which runs /init as PID 1 and
+//config: requires no special support.
+//config:
//config:config FEATURE_USE_INITTAB
//config: bool "Support reading an inittab file"
//config: default y
-//config: depends on INIT
+//config: depends on INIT || LINUXRC
//config: help
//config: Allow init to read an inittab file when the system boot.
//config:
@@ -46,7 +57,7 @@
//config:config FEATURE_INIT_SCTTY
//config: bool "Run commands with leading dash with controlling tty"
//config: default y
-//config: depends on INIT
+//config: depends on INIT || LINUXRC
//config: help
//config: If this option is enabled, init will try to give a controlling
//config: tty to any command which has leading hyphen (often it's "-/bin/sh").
@@ -61,40 +72,29 @@
//config:config FEATURE_INIT_SYSLOG
//config: bool "Enable init to write to syslog"
//config: default y
-//config: depends on INIT
+//config: depends on INIT || LINUXRC
//config:
//config:config FEATURE_EXTRA_QUIET
//config: bool "Be _extra_ quiet on boot"
//config: default y
-//config: depends on INIT
+//config: depends on INIT || LINUXRC
//config: help
//config: Prevent init from logging some messages to the console during boot.
//config:
//config:config FEATURE_INIT_COREDUMPS
//config: bool "Support dumping core for child processes (debugging only)"
//config: default y
-//config: depends on INIT
+//config: depends on INIT || LINUXRC
//config: help
//config: If this option is enabled and the file /.init_enable_core
//config: exists, then init will call setrlimit() to allow unlimited
//config: core file sizes. If this option is disabled, processes
//config: will not generate any core files.
//config:
-//config:config FEATURE_INITRD
-//config: bool "Support running init from within an initrd (not initramfs)"
-//config: default y
-//config: depends on INIT
-//config: help
-//config: Legacy support for running init under the old-style initrd. Allows
-//config: the name linuxrc to act as init, and it doesn't assume init is PID 1.
-//config:
-//config: This does not apply to initramfs, which runs /init as PID 1 and
-//config: requires no special support.
-//config:
//config:config INIT_TERMINAL_TYPE
//config: string "Initial terminal type"
//config: default "linux"
-//config: depends on INIT
+//config: depends on INIT || LINUXRC
//config: help
//config: This is the initial value set by init for the TERM environment
//config: variable. This variable is used by programs which make use of
@@ -106,7 +106,7 @@
//config:config FEATURE_INIT_MODIFY_CMDLINE
//config: bool "Modify the command-line to \"init\""
//config: default y
-//config: depends on INIT
+//config: depends on INIT || LINUXRC
//config: help
//config: When launched as PID 1 and after parsing its arguments, init
//config: wipes all the arguments but argv[0] and rewrites argv[0] to
@@ -119,9 +119,10 @@
//config: retrieved in /proc/1/cmdline on Linux, for example.
//applet:IF_INIT(APPLET(init, BB_DIR_SBIN, BB_SUID_DROP))
-//applet:IF_FEATURE_INITRD(APPLET_ODDNAME(linuxrc, init, BB_DIR_ROOT, BB_SUID_DROP, linuxrc))
+//applet:IF_LINUXRC(APPLET_ODDNAME(linuxrc, init, BB_DIR_ROOT, BB_SUID_DROP, linuxrc))
//kbuild:lib-$(CONFIG_INIT) += init.o
+//kbuild:lib-$(CONFIG_LINUXRC) += init.o
#define DEBUG_SEGV_HANDLER 0
@@ -1057,7 +1058,7 @@ int init_main(int argc UNUSED_PARAM, char **argv)
if (!DEBUG_INIT) {
/* Expect to be invoked as init with PID=1 or be invoked as linuxrc */
if (getpid() != 1
- && (!ENABLE_FEATURE_INITRD || applet_name[0] != 'l') /* not linuxrc? */
+ && (!ENABLE_LINUXRC || applet_name[0] != 'l') /* not linuxrc? */
) {
bb_error_msg_and_die("must be run as PID 1");
}