From f674a10f7ebc55de6181007a5216a297e3dc3365 Mon Sep 17 00:00:00 2001 From: Kamil Dudka Date: Wed, 23 Jul 2008 11:29:21 +0200 Subject: dd: new option: iflag=fullblock to accumulate full input blocks * src/dd.c (iread_fullblock): New function for reading full blocks. (scanargs): Check for new parameter iflag=fullblock. (skip): Use iread_fnc pointer instead of iread function. (dd_copy): Use iread_fnc pointer instead of iread function. * tests/dd/misc: Add test for dd - read full blocks. * doc/coretuils.texi: Mention new parameter iflag=fullblock. * NEWS: Mentioned the change. --- tests/dd/misc | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'tests/dd') diff --git a/tests/dd/misc b/tests/dd/misc index d54fbfaee..24e5eba55 100755 --- a/tests/dd/misc +++ b/tests/dd/misc @@ -88,6 +88,15 @@ fi outbytes=`echo x | dd bs=3 ibs=10 obs=10 conv=sync 2>/dev/null | wc -c` test "$outbytes" -eq 3 || fail=1 +(echo a; sleep .1; echo b) \ + | LC_ALL=C dd bs=4 status=noxfer iflag=fullblock >out 2>err || fail=1 +echo "a +b" > out_ok +echo "1+0 records in +1+0 records out" > err_ok +compare out out_ok || fail=1 +compare err err_ok || fail=1 + test $fail -eq 0 && fail=$warn (exit $fail); exit $fail -- cgit v1.2.3-70-g09d2