Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 25 Jan 2021 19:57:39 GMT
From:      Ed Maste <emaste@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
Subject:   git: 8564660237ae - main - newvers.sh: add newline at EOF in generated vers.c
Message-ID:  <202101251957.10PJvdTq005669@gitrepo.freebsd.org>

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

URL: https://cgit.FreeBSD.org/src/commit/?id=8564660237aec4c679e8b607dbbf861c90fafc4c

commit 8564660237aec4c679e8b607dbbf861c90fafc4c
Author:     Ed Maste <emaste@FreeBSD.org>
AuthorDate: 2021-01-25 19:53:47 +0000
Commit:     Ed Maste <emaste@FreeBSD.org>
CommitDate: 2021-01-25 19:57:18 +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`.
---
 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 605e61181dec..497ea44cdd64 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?202101251957.10PJvdTq005669>