summaryrefslogtreecommitdiff
path: root/shell/hush_test/hush-read/read_d0.right
diff options
context:
space:
mode:
authorChristian Eggers2020-06-29 17:57:24 +0200
committerDenys Vlasenko2020-07-31 18:42:30 +0200
commit39925026f6857979cbe603efd42073eb63f8d9de (patch)
treeee64a83ed44f4ba4a34bd869e0a4c282163981bb /shell/hush_test/hush-read/read_d0.right
parenta088da4476012e067a9a49de997031ea64ac401e (diff)
downloadbusybox-39925026f6857979cbe603efd42073eb63f8d9de.zip
busybox-39925026f6857979cbe603efd42073eb63f8d9de.tar.gz
shell: Fix "read -d ''" behavior
With bash's read builtin it is possible to read from a file (e.g. device-tree) until the first '\0' character: IFS= read -r -d '' VARIABLE < file In busybox ash the -d extension is also implemented, but checking the read character for '\0' has to be performed after comparing with the delimiter. Signed-off-by: Christian Eggers <ceggers@arri.de> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'shell/hush_test/hush-read/read_d0.right')
-rw-r--r--shell/hush_test/hush-read/read_d0.right1
1 files changed, 1 insertions, 0 deletions
diff --git a/shell/hush_test/hush-read/read_d0.right b/shell/hush_test/hush-read/read_d0.right
new file mode 100644
index 0000000..9daeafb
--- /dev/null
+++ b/shell/hush_test/hush-read/read_d0.right
@@ -0,0 +1 @@
+test