diff options
author | Glen Barber <gjb@FreeBSD.org> | 2015-01-23 21:04:59 +0000 |
---|---|---|
committer | Glen Barber <gjb@FreeBSD.org> | 2015-01-23 21:04:59 +0000 |
commit | e7c9030c0d6fb04f90f1087f2eab97c1bcf6f67a (patch) | |
tree | 876b7ee2e219c34c8f734ee59a0cda24d8bd0dae /release | |
parent | f860bc065abb40f8fa7ba7e05596377c9ac52dd9 (diff) | |
download | src-e7c9030c0d6fb04f90f1087f2eab97c1bcf6f67a.tar.gz src-e7c9030c0d6fb04f90f1087f2eab97c1bcf6f67a.zip |
When iterating through VMFORMATS, the VMBASE file is
not removed or truncated to a zero-size file, which
if used to create more than one disk image format, can
result in accidental pollution of the target formatted
disk image.
Instead of using a single VMBASE image (vm.img, by
default), use a single base file for each format, named
as VMFORMAT.img, which produces VMBASE.VMFORMAT as the
final formatted image.
Reported by: cperciva
MFC after: 1 month
X-MFC-with: r277458, r277536
Sponsored by: The FreeBSD Foundation
Notes
Notes:
svn path=/head/; revision=277609
Diffstat (limited to 'release')
-rw-r--r-- | release/Makefile.vm | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/release/Makefile.vm b/release/Makefile.vm index 17229bfb2792..fe955d30d8c1 100644 --- a/release/Makefile.vm +++ b/release/Makefile.vm @@ -50,8 +50,8 @@ vm-${_CW:tl}: .if defined(WITH_VMIMAGES) && !empty(WITH_VMIMAGES) CLEANDIRS+= ${VMTARGETS} -CLEANFILES+= ${VMBASE}.img . for FORMAT in ${VMFORMATS} +CLEANFILES+= ${FORMAT}.img CLEANFILES+= ${VMBASE}.${FORMAT} . endfor .endif @@ -65,7 +65,7 @@ vm-image: env TARGET=${TARGET} TARGET_ARCH=${TARGET_ARCH} \ ${.CURDIR}/scripts/mk-vmimage.sh \ -C ${.CURDIR}/tools/vmimage.subr -d ${.OBJDIR}/${.TARGET} \ - -i ${.OBJDIR}/${VMBASE}.img -s ${VMSIZE} -f ${FORMAT} \ + -i ${.OBJDIR}/${FORMAT}.img -s ${VMSIZE} -f ${FORMAT} \ -S ${WORLDDIR} -o ${.OBJDIR}/${VMBASE}.${FORMAT} . endfor .endif |