]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
vmimage.subr: noisier failure for unsupported targets
authormhorne <mhorne@FreeBSD.org>
Fri, 30 Oct 2020 18:18:25 +0000 (18:18 +0000)
committermhorne <mhorne@FreeBSD.org>
Fri, 30 Oct 2020 18:18:25 +0000 (18:18 +0000)
commit42af19b5b2e8c3d3fc7fb90f9f2840771d82f026
treec9200a388565842aa101a8321a2c1cf3ecee8b48
parent62c962fdaca0ba2cc26ed5d94037a70bb9e49c9e
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
release/tools/vmimage.subr