summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormhorne <mhorne@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>2020-10-30 18:18:25 +0000
committermhorne <mhorne@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>2020-10-30 18:18:25 +0000
commit3b6949072e7e55a2516969d511d3749dc32fa812 (patch)
treec9200a388565842aa101a8321a2c1cf3ecee8b48
parent6575f7497cbba352c861e0bf4ac0d7f0651fc9ff (diff)
downloadfreebsd-3b6949072e7e55a2516969d511d3749dc32fa812.tar.gz
freebsd-3b6949072e7e55a2516969d511d3749dc32fa812.tar.bz2
vmimage.subr: noisier failure for unsupported targets
The return code of write_partition_layout() doesn't bubble up, so an invocation of make vm-release for an incorrect/unsupported target will appear to succeed while make vm-install will fail due to missing files. This isn't a common point of failure, but is worth handling properly. Upgrade this case to print a message to stderr, and exit in place. This is okay to do since at this point in the execution of mk-vmimage.sh, cleanup() has already been run. Reviewed by: gjb MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D26985 git-svn-id: http://svn.freebsd.org/base/head@367176 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
-rw-r--r--release/tools/vmimage.subr4
1 files changed, 2 insertions, 2 deletions
diff --git a/release/tools/vmimage.subr b/release/tools/vmimage.subr
index a7fe65ac5e5..1f4d40ce913 100644
--- a/release/tools/vmimage.subr
+++ b/release/tools/vmimage.subr
@@ -43,8 +43,8 @@ write_partition_layout() {
ROOTFSPART="-p freebsd-ufs/rootfs:=${VMBASE}"
;;
*)
- # ENOTSUPP
- return 1
+ echo "vmimage.subr: unsupported target '${TARGET}:${TARGET_ARCH}'" >&2
+ exit 1
;;
esac