svn commit: r250329 - stable/8/bin/dd

Konstantin Belousov kib at FreeBSD.org
Tue May 7 09:48:43 UTC 2013


Author: kib
Date: Tue May  7 09:48:42 2013
New Revision: 250329
URL: http://svnweb.freebsd.org/changeset/base/250329

Log:
  MFC r249811:
  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.
  
  PR:	standards/177742

Modified:
  stable/8/bin/dd/dd.c
Directory Properties:
  stable/8/bin/dd/   (props changed)

Modified: stable/8/bin/dd/dd.c
==============================================================================
--- stable/8/bin/dd/dd.c	Tue May  7 09:47:12 2013	(r250328)
+++ stable/8/bin/dd/dd.c	Tue May  7 09:48:42 2013	(r250329)
@@ -351,7 +351,7 @@ dd_in(void)
 		 * 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 svn-src-stable-8 mailing list