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.
This commit is contained in:
Marcel Moolenaar 2015-06-21 01:35:32 +00:00
parent aa04413540
commit 4537ca4ef6
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=284655

View File

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