Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 5 Mar 2021 17:48:58 GMT
From:      Ed Maste <emaste@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org
Subject:   git: 680867cb7029 - stable/13 - newvers.sh: add newline at EOF in generated vers.c
Message-ID:  <202103051748.125Hmw8H061016@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch stable/13 has been updated by emaste:

URL: https://cgit.FreeBSD.org/src/commit/?id=680867cb7029cf60a401603794e202c588172dd1

commit 680867cb7029cf60a401603794e202c588172dd1
Author:     Ed Maste <emaste@FreeBSD.org>
AuthorDate: 2021-01-25 19:53:47 +0000
Commit:     Ed Maste <emaste@FreeBSD.org>
CommitDate: 2021-03-05 17:46:12 +0000

    newvers.sh: add newline at EOF in generated vers.c
    
    Previously we omitted the newline, which did not cause a functional
    issue for the build but resulted in suboptimal output from e.g.
    `cat vers.c`.
    
    (cherry picked from commit 8564660237aec4c679e8b607dbbf861c90fafc4c)
---
 sys/conf/newvers.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sys/conf/newvers.sh b/sys/conf/newvers.sh
index 0b5b76847320..acbebbd780b7 100644
--- a/sys/conf/newvers.sh
+++ b/sys/conf/newvers.sh
@@ -311,7 +311,7 @@ EOF
 )
 vers_content_old=$(cat vers.c 2>/dev/null || true)
 if [ "$vers_content_new" != "$vers_content_old" ]; then
-	printf "%s" "$vers_content_new" > vers.c
+	printf "%s\n" "$vers_content_new" > vers.c
 fi
 
 echo $((v + 1)) > version



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