aboutsummaryrefslogtreecommitdiff
path: root/shell/ash.c
diff options
context:
space:
mode:
Diffstat (limited to 'shell/ash.c')
-rw-r--r--shell/ash.c41
1 files changed, 22 insertions, 19 deletions
diff --git a/shell/ash.c b/shell/ash.c
index 9c5fbf5ff..d35ae027f 100644
--- a/shell/ash.c
+++ b/shell/ash.c
@@ -29,10 +29,15 @@
29 * - fake $PPID 29 * - fake $PPID
30 */ 30 */
31 31
32//config:config SHELL_ASH
33//config: bool #hidden option
34//config: depends on !NOMMU
35//config:
32//config:config ASH 36//config:config ASH
33//config: bool "ash (78 kb)" 37//config: bool "ash (78 kb)"
34//config: default y 38//config: default y
35//config: depends on !NOMMU 39//config: depends on !NOMMU
40//config: select SHELL_ASH
36//config: help 41//config: help
37//config: The most complete and most pedantically correct shell included with 42//config: The most complete and most pedantically correct shell included with
38//config: busybox. This shell is actually a derivative of the Debian 'dash' 43//config: busybox. This shell is actually a derivative of the Debian 'dash'
@@ -42,17 +47,17 @@
42//config:# ash options 47//config:# ash options
43//config:# note: Don't remove !NOMMU part in the next line; it would break 48//config:# note: Don't remove !NOMMU part in the next line; it would break
44//config:# menuconfig's indenting. 49//config:# menuconfig's indenting.
45//config:if !NOMMU && (ASH || SH_IS_ASH || BASH_IS_ASH) 50//config:if !NOMMU && (SHELL_ASH || ASH || SH_IS_ASH || BASH_IS_ASH)
46//config: 51//config:
47//config:config ASH_OPTIMIZE_FOR_SIZE 52//config:config ASH_OPTIMIZE_FOR_SIZE
48//config: bool "Optimize for size instead of speed" 53//config: bool "Optimize for size instead of speed"
49//config: default y 54//config: default y
50//config: depends on ASH || SH_IS_ASH || BASH_IS_ASH 55//config: depends on SHELL_ASH
51//config: 56//config:
52//config:config ASH_INTERNAL_GLOB 57//config:config ASH_INTERNAL_GLOB
53//config: bool "Use internal glob() implementation" 58//config: bool "Use internal glob() implementation"
54//config: default y # Y is bigger, but because of uclibc glob() bug, let Y be default for now 59//config: default y # Y is bigger, but because of uclibc glob() bug, let Y be default for now
55//config: depends on ASH || SH_IS_ASH || BASH_IS_ASH 60//config: depends on SHELL_ASH
56//config: help 61//config: help
57//config: Do not use glob() function from libc, use internal implementation. 62//config: Do not use glob() function from libc, use internal implementation.
58//config: Use this if you are getting "glob.h: No such file or directory" 63//config: Use this if you are getting "glob.h: No such file or directory"
@@ -63,7 +68,7 @@
63//config:config ASH_BASH_COMPAT 68//config:config ASH_BASH_COMPAT
64//config: bool "bash-compatible extensions" 69//config: bool "bash-compatible extensions"
65//config: default y 70//config: default y
66//config: depends on ASH || SH_IS_ASH || BASH_IS_ASH 71//config: depends on SHELL_ASH
67//config: 72//config:
68//config:config ASH_BASH_SOURCE_CURDIR 73//config:config ASH_BASH_SOURCE_CURDIR
69//config: bool "'source' and '.' builtins search current directory after $PATH" 74//config: bool "'source' and '.' builtins search current directory after $PATH"
@@ -84,17 +89,17 @@
84//config:config ASH_JOB_CONTROL 89//config:config ASH_JOB_CONTROL
85//config: bool "Job control" 90//config: bool "Job control"
86//config: default y 91//config: default y
87//config: depends on ASH || SH_IS_ASH || BASH_IS_ASH 92//config: depends on SHELL_ASH
88//config: 93//config:
89//config:config ASH_ALIAS 94//config:config ASH_ALIAS
90//config: bool "Alias support" 95//config: bool "Alias support"
91//config: default y 96//config: default y
92//config: depends on ASH || SH_IS_ASH || BASH_IS_ASH 97//config: depends on SHELL_ASH
93//config: 98//config:
94//config:config ASH_RANDOM_SUPPORT 99//config:config ASH_RANDOM_SUPPORT
95//config: bool "Pseudorandom generator and $RANDOM variable" 100//config: bool "Pseudorandom generator and $RANDOM variable"
96//config: default y 101//config: default y
97//config: depends on ASH || SH_IS_ASH || BASH_IS_ASH 102//config: depends on SHELL_ASH
98//config: help 103//config: help
99//config: Enable pseudorandom generator and dynamic variable "$RANDOM". 104//config: Enable pseudorandom generator and dynamic variable "$RANDOM".
100//config: Each read of "$RANDOM" will generate a new pseudorandom value. 105//config: Each read of "$RANDOM" will generate a new pseudorandom value.
@@ -105,7 +110,7 @@
105//config:config ASH_EXPAND_PRMT 110//config:config ASH_EXPAND_PRMT
106//config: bool "Expand prompt string" 111//config: bool "Expand prompt string"
107//config: default y 112//config: default y
108//config: depends on ASH || SH_IS_ASH || BASH_IS_ASH 113//config: depends on SHELL_ASH
109//config: help 114//config: help
110//config: $PS# may contain volatile content, such as backquote commands. 115//config: $PS# may contain volatile content, such as backquote commands.
111//config: This option recreates the prompt string from the environment 116//config: This option recreates the prompt string from the environment
@@ -114,14 +119,14 @@
114//config:config ASH_IDLE_TIMEOUT 119//config:config ASH_IDLE_TIMEOUT
115//config: bool "Idle timeout variable $TMOUT" 120//config: bool "Idle timeout variable $TMOUT"
116//config: default y 121//config: default y
117//config: depends on ASH || SH_IS_ASH || BASH_IS_ASH 122//config: depends on SHELL_ASH
118//config: help 123//config: help
119//config: Enable bash-like auto-logout after $TMOUT seconds of idle time. 124//config: Enable bash-like auto-logout after $TMOUT seconds of idle time.
120//config: 125//config:
121//config:config ASH_MAIL 126//config:config ASH_MAIL
122//config: bool "Check for new mail in interactive shell" 127//config: bool "Check for new mail in interactive shell"
123//config: default y 128//config: default y
124//config: depends on ASH || SH_IS_ASH || BASH_IS_ASH 129//config: depends on SHELL_ASH
125//config: help 130//config: help
126//config: Enable "check for new mail" function: 131//config: Enable "check for new mail" function:
127//config: if set, $MAIL file and $MAILPATH list of files 132//config: if set, $MAIL file and $MAILPATH list of files
@@ -131,32 +136,32 @@
131//config:config ASH_ECHO 136//config:config ASH_ECHO
132//config: bool "echo builtin" 137//config: bool "echo builtin"
133//config: default y 138//config: default y
134//config: depends on ASH || SH_IS_ASH || BASH_IS_ASH 139//config: depends on SHELL_ASH
135//config: 140//config:
136//config:config ASH_PRINTF 141//config:config ASH_PRINTF
137//config: bool "printf builtin" 142//config: bool "printf builtin"
138//config: default y 143//config: default y
139//config: depends on ASH || SH_IS_ASH || BASH_IS_ASH 144//config: depends on SHELL_ASH
140//config: 145//config:
141//config:config ASH_TEST 146//config:config ASH_TEST
142//config: bool "test builtin" 147//config: bool "test builtin"
143//config: default y 148//config: default y
144//config: depends on ASH || SH_IS_ASH || BASH_IS_ASH 149//config: depends on SHELL_ASH
145//config: 150//config:
146//config:config ASH_HELP 151//config:config ASH_HELP
147//config: bool "help builtin" 152//config: bool "help builtin"
148//config: default y 153//config: default y
149//config: depends on ASH || SH_IS_ASH || BASH_IS_ASH 154//config: depends on SHELL_ASH
150//config: 155//config:
151//config:config ASH_GETOPTS 156//config:config ASH_GETOPTS
152//config: bool "getopts builtin" 157//config: bool "getopts builtin"
153//config: default y 158//config: default y
154//config: depends on ASH || SH_IS_ASH || BASH_IS_ASH 159//config: depends on SHELL_ASH
155//config: 160//config:
156//config:config ASH_CMDCMD 161//config:config ASH_CMDCMD
157//config: bool "command builtin" 162//config: bool "command builtin"
158//config: default y 163//config: default y
159//config: depends on ASH || SH_IS_ASH || BASH_IS_ASH 164//config: depends on SHELL_ASH
160//config: help 165//config: help
161//config: Enable support for the 'command' builtin, which allows 166//config: Enable support for the 'command' builtin, which allows
162//config: you to run the specified command or builtin, 167//config: you to run the specified command or builtin,
@@ -188,9 +193,7 @@
188//applet:IF_SH_IS_ASH( APPLET_ODDNAME(sh, ash, BB_DIR_BIN, BB_SUID_DROP, ash)) 193//applet:IF_SH_IS_ASH( APPLET_ODDNAME(sh, ash, BB_DIR_BIN, BB_SUID_DROP, ash))
189//applet:IF_BASH_IS_ASH(APPLET_ODDNAME(bash, ash, BB_DIR_BIN, BB_SUID_DROP, ash)) 194//applet:IF_BASH_IS_ASH(APPLET_ODDNAME(bash, ash, BB_DIR_BIN, BB_SUID_DROP, ash))
190 195
191//kbuild:lib-$(CONFIG_ASH) += ash.o ash_ptr_hack.o shell_common.o 196//kbuild:lib-$(CONFIG_SHELL_ASH) += ash.o ash_ptr_hack.o shell_common.o
192//kbuild:lib-$(CONFIG_SH_IS_ASH) += ash.o ash_ptr_hack.o shell_common.o
193//kbuild:lib-$(CONFIG_BASH_IS_ASH) += ash.o ash_ptr_hack.o shell_common.o
194//kbuild:lib-$(CONFIG_ASH_RANDOM_SUPPORT) += random.o 197//kbuild:lib-$(CONFIG_ASH_RANDOM_SUPPORT) += random.o
195 198
196/* 199/*