diff options
author | Denys Vlasenko <vda.linux@googlemail.com> | 2011-02-04 17:36:21 +0100 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2011-02-04 17:36:21 +0100 |
commit | 8c52f803976c79812a75b9317107cc0a8fb94c7f (patch) | |
tree | 151b84ff8e9e3df462e8ecd154de8685605850a8 | |
parent | c5d0f15dbd8087f60b377fa9fc18d08698429189 (diff) | |
download | busybox-w32-8c52f803976c79812a75b9317107cc0a8fb94c7f.tar.gz busybox-w32-8c52f803976c79812a75b9317107cc0a8fb94c7f.tar.bz2 busybox-w32-8c52f803976c79812a75b9317107cc0a8fb94c7f.zip |
ash: cosmetic cleanups
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
-rw-r--r-- | shell/ash.c | 25 |
1 files changed, 12 insertions, 13 deletions
diff --git a/shell/ash.c b/shell/ash.c index 0bcbf9028..0e27a073c 100644 --- a/shell/ash.c +++ b/shell/ash.c | |||
@@ -105,7 +105,7 @@ | |||
105 | //config: Enable job control in the ash shell. | 105 | //config: Enable job control in the ash shell. |
106 | //config: | 106 | //config: |
107 | //config:config ASH_ALIAS | 107 | //config:config ASH_ALIAS |
108 | //config: bool "alias support" | 108 | //config: bool "Alias support" |
109 | //config: default y | 109 | //config: default y |
110 | //config: depends on ASH | 110 | //config: depends on ASH |
111 | //config: help | 111 | //config: help |
@@ -116,28 +116,28 @@ | |||
116 | //config: default y | 116 | //config: default y |
117 | //config: depends on ASH | 117 | //config: depends on ASH |
118 | //config: help | 118 | //config: help |
119 | //config: Enable getopts builtin in the ash shell. | 119 | //config: Enable support for getopts builtin in ash. |
120 | //config: | 120 | //config: |
121 | //config:config ASH_BUILTIN_ECHO | 121 | //config:config ASH_BUILTIN_ECHO |
122 | //config: bool "Builtin version of 'echo'" | 122 | //config: bool "Builtin version of 'echo'" |
123 | //config: default y | 123 | //config: default y |
124 | //config: depends on ASH | 124 | //config: depends on ASH |
125 | //config: help | 125 | //config: help |
126 | //config: Enable support for echo, builtin to ash. | 126 | //config: Enable support for echo builtin in ash. |
127 | //config: | 127 | //config: |
128 | //config:config ASH_BUILTIN_PRINTF | 128 | //config:config ASH_BUILTIN_PRINTF |
129 | //config: bool "Builtin version of 'printf'" | 129 | //config: bool "Builtin version of 'printf'" |
130 | //config: default y | 130 | //config: default y |
131 | //config: depends on ASH | 131 | //config: depends on ASH |
132 | //config: help | 132 | //config: help |
133 | //config: Enable support for printf, builtin to ash. | 133 | //config: Enable support for printf builtin in ash. |
134 | //config: | 134 | //config: |
135 | //config:config ASH_BUILTIN_TEST | 135 | //config:config ASH_BUILTIN_TEST |
136 | //config: bool "Builtin version of 'test'" | 136 | //config: bool "Builtin version of 'test'" |
137 | //config: default y | 137 | //config: default y |
138 | //config: depends on ASH | 138 | //config: depends on ASH |
139 | //config: help | 139 | //config: help |
140 | //config: Enable support for test, builtin to ash. | 140 | //config: Enable support for test builtin in ash. |
141 | //config: | 141 | //config: |
142 | //config:config ASH_CMDCMD | 142 | //config:config ASH_CMDCMD |
143 | //config: bool "'command' command to override shell builtins" | 143 | //config: bool "'command' command to override shell builtins" |
@@ -153,7 +153,7 @@ | |||
153 | //config: default n | 153 | //config: default n |
154 | //config: depends on ASH | 154 | //config: depends on ASH |
155 | //config: help | 155 | //config: help |
156 | //config: Enable "check for new mail" in the ash shell. | 156 | //config: Enable "check for new mail" function in the ash shell. |
157 | //config: | 157 | //config: |
158 | //config:config ASH_OPTIMIZE_FOR_SIZE | 158 | //config:config ASH_OPTIMIZE_FOR_SIZE |
159 | //config: bool "Optimize for size instead of speed" | 159 | //config: bool "Optimize for size instead of speed" |
@@ -1880,7 +1880,9 @@ change_lc_ctype(const char *value) | |||
1880 | #endif | 1880 | #endif |
1881 | #if ENABLE_ASH_MAIL | 1881 | #if ENABLE_ASH_MAIL |
1882 | static void chkmail(void); | 1882 | static void chkmail(void); |
1883 | static void changemail(const char *) FAST_FUNC; | 1883 | static void changemail(const char *var_value) FAST_FUNC; |
1884 | #else | ||
1885 | # define chkmail() ((void)0) | ||
1884 | #endif | 1886 | #endif |
1885 | static void changepath(const char *) FAST_FUNC; | 1887 | static void changepath(const char *) FAST_FUNC; |
1886 | #if ENABLE_ASH_RANDOM_SUPPORT | 1888 | #if ENABLE_ASH_RANDOM_SUPPORT |
@@ -9563,9 +9565,9 @@ preadfd(void) | |||
9563 | if (!iflag || g_parsefile->pf_fd != STDIN_FILENO) | 9565 | if (!iflag || g_parsefile->pf_fd != STDIN_FILENO) |
9564 | nr = nonblock_safe_read(g_parsefile->pf_fd, buf, IBUFSIZ - 1); | 9566 | nr = nonblock_safe_read(g_parsefile->pf_fd, buf, IBUFSIZ - 1); |
9565 | else { | 9567 | else { |
9566 | #if ENABLE_FEATURE_TAB_COMPLETION | 9568 | # if ENABLE_FEATURE_TAB_COMPLETION |
9567 | line_input_state->path_lookup = pathval(); | 9569 | line_input_state->path_lookup = pathval(); |
9568 | #endif | 9570 | # endif |
9569 | nr = read_line_input(cmdedit_prompt, buf, IBUFSIZ, line_input_state); | 9571 | nr = read_line_input(cmdedit_prompt, buf, IBUFSIZ, line_input_state); |
9570 | if (nr == 0) { | 9572 | if (nr == 0) { |
9571 | /* Ctrl+C pressed */ | 9573 | /* Ctrl+C pressed */ |
@@ -9586,8 +9588,7 @@ preadfd(void) | |||
9586 | nr = nonblock_safe_read(g_parsefile->pf_fd, buf, IBUFSIZ - 1); | 9588 | nr = nonblock_safe_read(g_parsefile->pf_fd, buf, IBUFSIZ - 1); |
9587 | #endif | 9589 | #endif |
9588 | 9590 | ||
9589 | #if 0 | 9591 | #if 0 /* disabled: nonblock_safe_read() handles this problem */ |
9590 | /* nonblock_safe_read() handles this problem */ | ||
9591 | if (nr < 0) { | 9592 | if (nr < 0) { |
9592 | if (parsefile->fd == 0 && errno == EWOULDBLOCK) { | 9593 | if (parsefile->fd == 0 && errno == EWOULDBLOCK) { |
9593 | int flags = fcntl(0, F_GETFL); | 9594 | int flags = fcntl(0, F_GETFL); |
@@ -12072,9 +12073,7 @@ cmdloop(int top) | |||
12072 | inter = 0; | 12073 | inter = 0; |
12073 | if (iflag && top) { | 12074 | if (iflag && top) { |
12074 | inter++; | 12075 | inter++; |
12075 | #if ENABLE_ASH_MAIL | ||
12076 | chkmail(); | 12076 | chkmail(); |
12077 | #endif | ||
12078 | } | 12077 | } |
12079 | n = parsecmd(inter); | 12078 | n = parsecmd(inter); |
12080 | #if DEBUG | 12079 | #if DEBUG |