From 0e056f7e9efcebbbb85444221e141b37d3ab79e6 Mon Sep 17 00:00:00 2001 From: Ron Yorston Date: Wed, 1 Jul 2015 16:45:40 +0100 Subject: ash: remove parsebackquote flag Commit 503a0b8 from git://git.kernel.org/pub/scm/utils/dash/dash.git by Herbert Xu says: >The parsebackquote flag is only used in a test where it always has the >value zero. So we can remove it altogether. The first statement is incorrect: parsebackquote is non-zero when backquotes (as opposed to $(...)) are used for command substitution. It is possible for the test to be executed with parsebackquote != 0 in that case. The test is question checks whether quotes have been closed, raising the error "unterminated quoted string" if they haven't. There seems to be no good reason to allow unclosed quotes within backquotes. Bash, hush and dash (after commit 503a0b8) all treat the following as an error: XX=`"pwd` whereas BusyBox ash doesn't. It just ignores the unclosed quote and executes pwd. So, parsebackquote should be removed but not for the reason stated. function old new delta parsebackquote 1 - -1 readtoken1 3222 3182 -40 ------------------------------------------------------------------------------ (add/remove: 0/1 grow/shrink: 0/1 up/down: 0/-41) Total: -41 bytes Signed-off-by: Ron Yorston Signed-off-by: Denys Vlasenko --- shell/ash_test/ash-misc/tickquote1.tests | 1 + 1 file changed, 1 insertion(+) create mode 100755 shell/ash_test/ash-misc/tickquote1.tests (limited to 'shell/ash_test/ash-misc/tickquote1.tests') diff --git a/shell/ash_test/ash-misc/tickquote1.tests b/shell/ash_test/ash-misc/tickquote1.tests new file mode 100755 index 000000000..90d5bbc9b --- /dev/null +++ b/shell/ash_test/ash-misc/tickquote1.tests @@ -0,0 +1 @@ +echo `"pwd` -- cgit v1.2.3