summaryrefslogtreecommitdiffstats
path: root/sys/conf/newvers.sh
diff options
context:
space:
mode:
authorjmallett <jmallett@FreeBSD.org>2003-06-09 09:38:20 +0000
committerjmallett <jmallett@FreeBSD.org>2003-06-09 09:38:20 +0000
commitf315e03eafe4decb20f007ba50f2c0bbd07209aa (patch)
tree63448f4636bc01d8e3847824509199f59c05b3b2 /sys/conf/newvers.sh
parent0e96b35689d627ad5cfe6b881520841fae6da5c6 (diff)
downloadFreeBSD-src-f315e03eafe4decb20f007ba50f2c0bbd07209aa.zip
FreeBSD-src-f315e03eafe4decb20f007ba50f2c0bbd07209aa.tar.gz
Make kernel identification (`ident' in the config(8) driver) available to
userland, and the kernel. In the kernel by way of the 'ident[]' variable akin to all the other stuff generated by newvers.sh. In userland it is available to sysctl consumers via KERN_IDENT or 'kern.ident'. It is exported by uname(1) by the -i flag. Reviewed by: hackers@
Diffstat (limited to 'sys/conf/newvers.sh')
-rw-r--r--sys/conf/newvers.sh2
1 files changed, 2 insertions, 0 deletions
diff --git a/sys/conf/newvers.sh b/sys/conf/newvers.sh
index ce2d31d..d27e926 100644
--- a/sys/conf/newvers.sh
+++ b/sys/conf/newvers.sh
@@ -86,6 +86,7 @@ fi
touch version
v=`cat version` u=${USER-root} d=`pwd` h=`hostname` t=`date`
+i=`make -V KERN_IDENT`
cat << EOF > vers.c
$COPYRIGHT
char sccspad[32 - 4 /* sizeof(sccs) */] = { '\\0' };
@@ -94,6 +95,7 @@ char version[] = "${VERSION} #${v}: ${t}\\n ${u}@${h}:${d}\\n";
char ostype[] = "${TYPE}";
char osrelease[] = "${RELEASE}";
int osreldate = ${RELDATE};
+char ident[] = "${i}";
EOF
echo `expr ${v} + 1` > version
OpenPOWER on IntegriCloud