Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 21 Jun 2015 01:35:33 +0000 (UTC)
From:      Marcel Moolenaar <marcel@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r284655 - head/usr.bin/mkimg
Message-ID:  <201506210135.t5L1ZXuV001933@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: marcel
Date: Sun Jun 21 01:35:32 2015
New Revision: 284655
URL: https://svnweb.freebsd.org/changeset/base/284655

Log:
  Don't resize again prior to writing. Resizing may not be idempotent
  and no scheme adjusts the size after the format resized the image
  the first time.

Modified:
  head/usr.bin/mkimg/format.c

Modified: head/usr.bin/mkimg/format.c
==============================================================================
--- head/usr.bin/mkimg/format.c	Sun Jun 21 01:22:35 2015	(r284654)
+++ head/usr.bin/mkimg/format.c	Sun Jun 21 01:35:32 2015	(r284655)
@@ -78,14 +78,10 @@ format_selected(void)
 int
 format_write(int fd)
 {
-	lba_t size;
 	int error;
 
 	if (format == NULL)
 		return (ENOSYS);
-	size = image_get_size();
-	error = format->resize(size);
-	if (!error)
-		error = format->write(fd);
+	error = format->write(fd);
 	return (error);
 }



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