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);
 }
_______________________________________________
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to