mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-18 10:35:55 +00:00
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:
parent
aa04413540
commit
4537ca4ef6
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=284655
@ -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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user