diff options
author | Ron Yorston <rmy@pobox.com> | 2016-05-16 09:33:03 +0100 |
---|---|---|
committer | Ron Yorston <rmy@pobox.com> | 2016-05-16 09:33:03 +0100 |
commit | 35d2f5bccb0f3dde600702ebcdb5424d4d50be4a (patch) | |
tree | 6e0ff0341c69839e268459a199682628bae734ed /shell | |
parent | 248a2600a2f4b442101ad568d1994b908bb28d4b (diff) | |
parent | f2559e5c2b7bd2c5fa0dd8e88d0a931da92a23af (diff) | |
download | busybox-w32-35d2f5bccb0f3dde600702ebcdb5424d4d50be4a.tar.gz busybox-w32-35d2f5bccb0f3dde600702ebcdb5424d4d50be4a.tar.bz2 busybox-w32-35d2f5bccb0f3dde600702ebcdb5424d4d50be4a.zip |
Merge branch 'busybox' into merge
Diffstat (limited to 'shell')
-rw-r--r-- | shell/ash.c | 11 | ||||
-rw-r--r-- | shell/ash_test/ash-heredoc/heredoc4.right | 1 | ||||
-rwxr-xr-x | shell/ash_test/ash-heredoc/heredoc4.tests | 3 | ||||
-rw-r--r-- | shell/ash_test/ash-quoting/dollar_squote_bash1.right | 1 | ||||
-rwxr-xr-x | shell/ash_test/ash-quoting/dollar_squote_bash1.tests | 1 | ||||
-rw-r--r-- | shell/shell_common.c | 2 |
6 files changed, 13 insertions, 6 deletions
diff --git a/shell/ash.c b/shell/ash.c index 52feff422..5870a23f3 100644 --- a/shell/ash.c +++ b/shell/ash.c | |||
@@ -2942,7 +2942,7 @@ pwdcmd(int argc UNUSED_PARAM, char **argv UNUSED_PARAM) | |||
2942 | #else | 2942 | #else |
2943 | # define SIT_ITEM(a,b,c,d) (a | (b << 4) | (c << 8)) | 2943 | # define SIT_ITEM(a,b,c,d) (a | (b << 4) | (c << 8)) |
2944 | #endif | 2944 | #endif |
2945 | static const uint16_t S_I_T[] = { | 2945 | static const uint16_t S_I_T[] ALIGN2 = { |
2946 | #if ENABLE_ASH_ALIAS | 2946 | #if ENABLE_ASH_ALIAS |
2947 | SIT_ITEM(CSPCL , CIGN , CIGN , CIGN ), /* 0, PEOA */ | 2947 | SIT_ITEM(CSPCL , CIGN , CIGN , CIGN ), /* 0, PEOA */ |
2948 | #endif | 2948 | #endif |
@@ -3044,7 +3044,7 @@ SIT(int c, int syntax) | |||
3044 | 3044 | ||
3045 | #else /* !USE_SIT_FUNCTION */ | 3045 | #else /* !USE_SIT_FUNCTION */ |
3046 | 3046 | ||
3047 | static const uint8_t syntax_index_table[] = { | 3047 | static const uint8_t syntax_index_table[] ALIGN1 = { |
3048 | /* BASESYNTAX_DQSYNTAX_SQSYNTAX_ARISYNTAX */ | 3048 | /* BASESYNTAX_DQSYNTAX_SQSYNTAX_ARISYNTAX */ |
3049 | /* 0 */ CWORD_CWORD_CWORD_CWORD, | 3049 | /* 0 */ CWORD_CWORD_CWORD_CWORD, |
3050 | /* 1 */ CWORD_CWORD_CWORD_CWORD, | 3050 | /* 1 */ CWORD_CWORD_CWORD_CWORD, |
@@ -8320,7 +8320,7 @@ static char **nodeptr; | |||
8320 | #define EV_TESTED 02 /* exit status is checked; ignore -e flag */ | 8320 | #define EV_TESTED 02 /* exit status is checked; ignore -e flag */ |
8321 | #define EV_BACKCMD 04 /* command executing within back quotes */ | 8321 | #define EV_BACKCMD 04 /* command executing within back quotes */ |
8322 | 8322 | ||
8323 | static const uint8_t nodesize[N_NUMBER] = { | 8323 | static const uint8_t nodesize[N_NUMBER] ALIGN1 = { |
8324 | [NCMD ] = SHELL_ALIGN(sizeof(struct ncmd)), | 8324 | [NCMD ] = SHELL_ALIGN(sizeof(struct ncmd)), |
8325 | [NPIPE ] = SHELL_ALIGN(sizeof(struct npipe)), | 8325 | [NPIPE ] = SHELL_ALIGN(sizeof(struct npipe)), |
8326 | [NREDIR ] = SHELL_ALIGN(sizeof(struct nredir)), | 8326 | [NREDIR ] = SHELL_ALIGN(sizeof(struct nredir)), |
@@ -11935,7 +11935,7 @@ parsesub: { | |||
11935 | || (c != '(' && c != '{' && !is_name(c) && !is_special(c)) | 11935 | || (c != '(' && c != '{' && !is_name(c) && !is_special(c)) |
11936 | ) { | 11936 | ) { |
11937 | #if ENABLE_ASH_BASH_COMPAT | 11937 | #if ENABLE_ASH_BASH_COMPAT |
11938 | if (c == '\'') | 11938 | if (syntax != DQSYNTAX && c == '\'') |
11939 | bash_dollar_squote = 1; | 11939 | bash_dollar_squote = 1; |
11940 | else | 11940 | else |
11941 | #endif | 11941 | #endif |
@@ -13072,7 +13072,8 @@ helpcmd(int argc UNUSED_PARAM, char **argv UNUSED_PARAM) | |||
13072 | out1fmt("\n"); | 13072 | out1fmt("\n"); |
13073 | col = 0; | 13073 | col = 0; |
13074 | } | 13074 | } |
13075 | a += strlen(a) + 1; | 13075 | while (*a++ != '\0') |
13076 | continue; | ||
13076 | } | 13077 | } |
13077 | } | 13078 | } |
13078 | # endif | 13079 | # endif |
diff --git a/shell/ash_test/ash-heredoc/heredoc4.right b/shell/ash_test/ash-heredoc/heredoc4.right new file mode 100644 index 000000000..371b092e2 --- /dev/null +++ b/shell/ash_test/ash-heredoc/heredoc4.right | |||
@@ -0,0 +1 @@ | |||
'$' | |||
diff --git a/shell/ash_test/ash-heredoc/heredoc4.tests b/shell/ash_test/ash-heredoc/heredoc4.tests new file mode 100755 index 000000000..642ddb324 --- /dev/null +++ b/shell/ash_test/ash-heredoc/heredoc4.tests | |||
@@ -0,0 +1,3 @@ | |||
1 | cat <<EOF | ||
2 | '$' | ||
3 | EOF | ||
diff --git a/shell/ash_test/ash-quoting/dollar_squote_bash1.right b/shell/ash_test/ash-quoting/dollar_squote_bash1.right index 57536b1d9..9f4e25efa 100644 --- a/shell/ash_test/ash-quoting/dollar_squote_bash1.right +++ b/shell/ash_test/ash-quoting/dollar_squote_bash1.right | |||
@@ -1,4 +1,5 @@ | |||
1 | a b | 1 | a b |
2 | $'a\tb' | ||
2 | a | 3 | a |
3 | b c | 4 | b c |
4 | def | 5 | def |
diff --git a/shell/ash_test/ash-quoting/dollar_squote_bash1.tests b/shell/ash_test/ash-quoting/dollar_squote_bash1.tests index 93a56cac3..6fc411b93 100755 --- a/shell/ash_test/ash-quoting/dollar_squote_bash1.tests +++ b/shell/ash_test/ash-quoting/dollar_squote_bash1.tests | |||
@@ -1,4 +1,5 @@ | |||
1 | echo $'a\tb' | 1 | echo $'a\tb' |
2 | echo "$'a\tb'" | ||
2 | echo $'a\nb' $'c\nd''ef' | 3 | echo $'a\nb' $'c\nd''ef' |
3 | echo $'a\'b' $'c\"d' $'e\\f' | 4 | echo $'a\'b' $'c\"d' $'e\\f' |
4 | echo $'a\63b' $'c\063b' $'e\0633f' | 5 | echo $'a\63b' $'c\063b' $'e\0633f' |
diff --git a/shell/shell_common.c b/shell/shell_common.c index dbd4286bf..c3bff477d 100644 --- a/shell/shell_common.c +++ b/shell/shell_common.c | |||
@@ -335,7 +335,7 @@ enum { | |||
335 | }; | 335 | }; |
336 | 336 | ||
337 | /* "-": treat args as parameters of option with ASCII code 1 */ | 337 | /* "-": treat args as parameters of option with ASCII code 1 */ |
338 | static const char ulimit_opt_string[] = "-HSa" | 338 | static const char ulimit_opt_string[] ALIGN1 = "-HSa" |
339 | #ifdef RLIMIT_FSIZE | 339 | #ifdef RLIMIT_FSIZE |
340 | "f::" | 340 | "f::" |
341 | #endif | 341 | #endif |