busybox/shell/hush_test/hush-read
Christian Eggers 39925026f6 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>
2020-07-31 18:42:30 +02:00
..
read_d0.right shell: Fix "read -d ''" behavior 2020-07-31 18:42:30 +02:00
read_d0.tests shell: Fix "read -d ''" behavior 2020-07-31 18:42:30 +02:00
read_ifs.right hush: use ash's read builtin 2010-01-12 23:29:57 +01:00
read_ifs.tests hush: use ash's read builtin 2010-01-12 23:29:57 +01:00
read_ifs2.right hush: fix IFS handling in read 2018-04-11 17:18:34 +02:00
read_ifs2.tests hush: fix IFS handling in read 2018-04-11 17:18:34 +02:00
read_n.right hush: use ash's read builtin 2010-01-12 23:29:57 +01:00
read_n.tests hush: use ash's read builtin 2010-01-12 23:29:57 +01:00
read_r.right hush: use ash's read builtin 2010-01-12 23:29:57 +01:00
read_r.tests hush testsuite: add many tests from ash testsuite 2016-10-02 17:39:31 +02:00
read_REPLY.right hush: use ash's read builtin 2010-01-12 23:29:57 +01:00
read_REPLY.tests hush: use ash's read builtin 2010-01-12 23:29:57 +01:00
read_SIGCHLD.right ash,hush: fix SIGCHLD interrupting read builtin 2017-05-22 19:34:45 +02:00
read_SIGCHLD.tests ash,hush: fix SIGCHLD interrupting read builtin 2017-05-22 19:34:45 +02:00
read_t.right hush: use ash's read builtin 2010-01-12 23:29:57 +01:00
read_t.tests hush: use ash's read builtin 2010-01-12 23:29:57 +01:00
read_t0.right shell: optional support for read -t N.NNN, closes 10101 2017-07-20 16:09:31 +02:00
read_t0.tests shell: optional support for read -t N.NNN, closes 10101 2017-07-20 16:09:31 +02:00