aboutsummaryrefslogtreecommitdiff
path: root/stand/common
diff options
context:
space:
mode:
authorStephen J. Kiernan <stevek@FreeBSD.org>2023-04-17 23:27:54 +0000
committerStephen J. Kiernan <stevek@FreeBSD.org>2023-04-19 17:58:53 +0000
commita50d73d5782a351ad83e8d1f84d11720a12e70d3 (patch)
treea36e1503424c3906847755bbeb1babbbeb0fd4c0 /stand/common
parent010795fc824c4a763d26a2137c30a61d501f8177 (diff)
loader: Change version calculation to be more consistent.
Use 1000 * major + minor when calculating the version number that gets set in the Ficl environment or lua loader property. This allows for more room if the minor number needs to go above 9. Add loader.version property to lua loader. Reviewed by: imp Obtained from: Juniper Networks, Inc. Differential Revision: https://reviews.freebsd.org/D39631
Diffstat (limited to 'stand/common')
-rw-r--r--stand/common/bootstrap.h1
-rw-r--r--stand/common/interp_forth.c1
-rwxr-xr-xstand/common/newvers.sh2
3 files changed, 2 insertions, 2 deletions
diff --git a/stand/common/bootstrap.h b/stand/common/bootstrap.h
index 80c1a2352b3c..d62a936e6ff0 100644
--- a/stand/common/bootstrap.h
+++ b/stand/common/bootstrap.h
@@ -182,6 +182,7 @@ extern int isapnp_readport;
* Version information
*/
extern char bootprog_info[];
+extern unsigned bootprog_rev;
/*
* Interpreter information
diff --git a/stand/common/interp_forth.c b/stand/common/interp_forth.c
index 19f1c75dc191..edf21e53dc18 100644
--- a/stand/common/interp_forth.c
+++ b/stand/common/interp_forth.c
@@ -33,7 +33,6 @@ __FBSDID("$FreeBSD$");
#include "bootstrap.h"
#include "ficl.h"
-extern unsigned bootprog_rev;
INTERP_DEFINE("4th");
/* #define BFORTH_DEBUG */
diff --git a/stand/common/newvers.sh b/stand/common/newvers.sh
index 714adba6c9cb..1a3ceb91af17 100755
--- a/stand/common/newvers.sh
+++ b/stand/common/newvers.sh
@@ -57,6 +57,6 @@ fi
cat > $tempfile <<EOF
char bootprog_info[] = "$bootprog_info";
-unsigned bootprog_rev = ${r%%.*}${r##*.};
+unsigned bootprog_rev = ${r%%.*} * 1000 + ${r##*.};
EOF
mv $tempfile vers.c