Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 10 Mar 2018 08:51:02 +0000 (UTC)
From:      Eitan Adler <eadler@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org
Subject:   svn commit: r330738 - in stable/11/bin/cat: . tests
Message-ID:  <201803100851.w2A8p284070839@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: eadler
Date: Sat Mar 10 08:51:02 2018
New Revision: 330738
URL: https://svnweb.freebsd.org/changeset/base/330738

Log:
  Revert MFC of r323865
  
  While this behavior can be viewed as a bug fix, due to the fundamental
  nature of cat(1), leave this change only for a major version.
  
  PR:	210607
  Requested by:	sevan

Modified:
  stable/11/bin/cat/cat.c
  stable/11/bin/cat/tests/Makefile
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/bin/cat/cat.c
==============================================================================
--- stable/11/bin/cat/cat.c	Sat Mar 10 04:17:01 2018	(r330737)
+++ stable/11/bin/cat/cat.c	Sat Mar 10 08:51:02 2018	(r330738)
@@ -225,16 +225,10 @@ cook_cat(FILE *fp)
 				} else
 					gobble = 0;
 			}
-			if (nflag) {
-				if (!bflag || ch != '\n') {
-					(void)fprintf(stdout, "%6d\t", ++line);
-					if (ferror(stdout))
-						break;
-				} else if (eflag) {
-					(void)fprintf(stdout, "%6s\t", "");
-					if (ferror(stdout))
-						break;
-				}
+			if (nflag && (!bflag || ch != '\n')) {
+				(void)fprintf(stdout, "%6d\t", ++line);
+				if (ferror(stdout))
+					break;
 			}
 		}
 		if (ch == '\n') {

Modified: stable/11/bin/cat/tests/Makefile
==============================================================================
--- stable/11/bin/cat/tests/Makefile	Sat Mar 10 04:17:01 2018	(r330737)
+++ stable/11/bin/cat/tests/Makefile	Sat Mar 10 08:51:02 2018	(r330738)
@@ -17,4 +17,10 @@ ${PACKAGE}FILES+=		d_vt_output.out
 
 .include <netbsd-tests.test.mk>
 
+d_align.out: ${TESTSRC}/d_align.out
+	sed -E -e 's,^[[:space:]]{7}\$$$$,\$$,' < ${.ALLSRC} > ${.TARGET}.tmp
+	mv ${.TARGET}.tmp ${.TARGET}
+
+CLEANFILES+=			d_align.out d_align.out.tmp
+
 .include <bsd.test.mk>



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201803100851.w2A8p284070839>