Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 30 Oct 2020 18:18:26 +0000 (UTC)
From:      Mitchell Horne <mhorne@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r367176 - head/release/tools
Message-ID:  <202010301818.09UIIQWE015354@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: mhorne
Date: Fri Oct 30 18:18:25 2020
New Revision: 367176
URL: https://svnweb.freebsd.org/changeset/base/367176

Log:
  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

Modified:
  head/release/tools/vmimage.subr

Modified: head/release/tools/vmimage.subr
==============================================================================
--- head/release/tools/vmimage.subr	Fri Oct 30 18:16:10 2020	(r367175)
+++ head/release/tools/vmimage.subr	Fri Oct 30 18:18:25 2020	(r367176)
@@ -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
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202010301818.09UIIQWE015354>