git: ca2d4026c3f2 - main - nanobsd: Fix code image size formatting
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Wed, 27 May 2026 00:37:06 UTC
The branch main has been updated by jlduran:
URL: https://cgit.FreeBSD.org/src/commit/?id=ca2d4026c3f2bb8eeab888cf50f2c2e3914ab3e5
commit ca2d4026c3f2bb8eeab888cf50f2c2e3914ab3e5
Author: Jose Luis Duran <jlduran@FreeBSD.org>
AuthorDate: 2026-05-27 00:23:05 +0000
Commit: Jose Luis Duran <jlduran@FreeBSD.org>
CommitDate: 2026-05-27 00:23:05 +0000
nanobsd: Fix code image size formatting
mkimg(8) parses sizes using expand_number(3). It is an error to use "b"
as a suffix. This is the result of a confusion with makefs(8), which
uses NetBSD's strsuftoll(3).
Reviewed by: imp
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D57224
---
tools/tools/nanobsd/legacy.sh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/tools/nanobsd/legacy.sh b/tools/tools/nanobsd/legacy.sh
index 52d60b4fda8c..ed4bd493c8d7 100644
--- a/tools/tools/nanobsd/legacy.sh
+++ b/tools/tools/nanobsd/legacy.sh
@@ -326,7 +326,7 @@ _create_diskimage() {
altroot="-p freebsd:=${NANO_OBJ}/_.altroot.image:+$(( NANO_SECTS * 512 ))"
rm -f "${NANO_OBJ}/_.altroot.part"
else
- altroot="-p freebsd::${CODE_SIZE}b:+$(( NANO_SECTS * 512 ))"
+ altroot="-p freebsd::$(( CODE_SIZE * 512 )):+$(( NANO_SECTS * 512 ))"
fi
else
altroot="-p-"