[Midnightbsd-cvs] src [9338] trunk/bin/dd/dd.c: Literally follow POSIX:

laffer1 at midnightbsd.org laffer1 at midnightbsd.org
Sat Mar 4 11:09:35 EST 2017


Revision: 9338
          http://svnweb.midnightbsd.org/src/?rev=9338
Author:   laffer1
Date:     2017-03-04 11:09:35 -0500 (Sat, 04 Mar 2017)
Log Message:
-----------
Literally follow POSIX:
If the bs= expr operand is specified and no conversions other than sync,
noerror, or notrunc are requested, the data returned from each input
block shall be written as a separate output block.

Modified Paths:
--------------
    trunk/bin/dd/dd.c

Modified: trunk/bin/dd/dd.c
===================================================================
--- trunk/bin/dd/dd.c	2017-03-04 16:08:55 UTC (rev 9337)
+++ trunk/bin/dd/dd.c	2017-03-04 16:09:35 UTC (rev 9338)
@@ -352,7 +352,7 @@
 		 * than noerror, notrunc or sync are specified, the block
 		 * is output without buffering as it is read.
 		 */
-		if (ddflags & C_BS) {
+		if ((ddflags & ~(C_NOERROR | C_NOTRUNC | C_SYNC)) == C_BS) {
 			out.dbcnt = in.dbcnt;
 			dd_out(1);
 			in.dbcnt = 0;



More information about the Midnightbsd-cvs mailing list