svn commit: r284655 - head/usr.bin/mkimg

Marcel Moolenaar marcel at FreeBSD.org
Sun Jun 21 01:35:33 UTC 2015


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);
 }


More information about the svn-src-head mailing list