git: 1dac971fbdfb - main - nanobsd: Minor style fixes
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Wed, 27 May 2026 00:36:56 UTC
The branch main has been updated by jlduran:
URL: https://cgit.FreeBSD.org/src/commit/?id=1dac971fbdfbe0acc8289eceddc383172a9aac44
commit 1dac971fbdfbe0acc8289eceddc383172a9aac44
Author: Jose Luis Duran <jlduran@FreeBSD.org>
AuthorDate: 2026-05-27 00:12:07 +0000
Commit: Jose Luis Duran <jlduran@FreeBSD.org>
CommitDate: 2026-05-27 00:12:07 +0000
nanobsd: Minor style fixes
- Use $(...) notation instead of legacy backticked `...`
- Use tabs for indentation
- Indent continuation lines with 4 spaces
Reviewed by: imp
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D57039
---
tools/tools/nanobsd/legacy.sh | 24 ++++++++++++------------
1 file changed, 12 insertions(+), 12 deletions(-)
diff --git a/tools/tools/nanobsd/legacy.sh b/tools/tools/nanobsd/legacy.sh
index 06dce15ffa0a..fde4be9c7d5b 100644
--- a/tools/tools/nanobsd/legacy.sh
+++ b/tools/tools/nanobsd/legacy.sh
@@ -111,17 +111,17 @@ create_code_slice() {
IMG=${NANO_DISKIMGDIR}/_.disk.image
MNT=${NANO_OBJ}/_.mnt
mkdir -p ${MNT}
- CODE_SIZE=`head -n 1 ${NANO_LOG}/_.partitioning | awk '{ print $2 }'`
+ CODE_SIZE=$(head -n 1 ${NANO_LOG}/_.partitioning | awk '{ print $2 }')
if [ "${NANO_MD_BACKING}" = "swap" ] ; then
- MD=`mdconfig -a -t swap -s ${CODE_SIZE} -x ${NANO_SECTS} \
- -y ${NANO_HEADS}`
+ MD=$(mdconfig -a -t swap -s ${CODE_SIZE} -x ${NANO_SECTS} \
+ -y ${NANO_HEADS})
else
echo "Creating md backing file..."
rm -f ${IMG}
dd if=/dev/zero of=${IMG} seek=${CODE_SIZE} count=0
- MD=`mdconfig -a -t vnode -f ${IMG} -x ${NANO_SECTS} \
- -y ${NANO_HEADS}`
+ MD=$(mdconfig -a -t vnode -f ${IMG} -x ${NANO_SECTS} \
+ -y ${NANO_HEADS})
fi
trap "echo 'Running exit trap code' ; df -i ${MNT} ; nano_umount ${MNT} || true ; mdconfig -d -u $MD" 1 2 15 EXIT
@@ -129,10 +129,10 @@ create_code_slice() {
gpart create -s bsd "${MD}"
gpart add -t freebsd-ufs -b 16 "${MD}"
if [ -f ${NANO_WORLDDIR}/boot/boot ]; then
- echo "Making bootable partition"
- gpart bootcode -b ${NANO_WORLDDIR}/boot/boot ${MD}
+ echo "Making bootable partition"
+ gpart bootcode -b ${NANO_WORLDDIR}/boot/boot ${MD}
else
- echo "Partition will not be bootable"
+ echo "Partition will not be bootable"
fi
gpart list ${MD}
@@ -194,14 +194,14 @@ create_diskimage() {
mkdir -p ${MNT}
if [ "${NANO_MD_BACKING}" = "swap" ] ; then
- MD=`mdconfig -a -t swap -s ${NANO_MEDIASIZE} -x ${NANO_SECTS} \
- -y ${NANO_HEADS}`
+ MD=$(mdconfig -a -t swap -s ${NANO_MEDIASIZE} -x ${NANO_SECTS} \
+ -y ${NANO_HEADS})
else
echo "Creating md backing file..."
rm -f ${IMG}
dd if=/dev/zero of=${IMG} seek=${NANO_MEDIASIZE} count=0
- MD=`mdconfig -a -t vnode -f ${IMG} -x ${NANO_SECTS} \
- -y ${NANO_HEADS}`
+ MD=$(mdconfig -a -t vnode -f ${IMG} -x ${NANO_SECTS} \
+ -y ${NANO_HEADS})
fi
awk '