summaryrefslogtreecommitdiffstats
path: root/usr.bin/mkimg
diff options
context:
space:
mode:
authormarcel <marcel@FreeBSD.org>2015-06-21 01:35:32 +0000
committermarcel <marcel@FreeBSD.org>2015-06-21 01:35:32 +0000
commit162b419db0120c29b07529d37bbb99ec2b79ffbd (patch)
treed381839e4f6328a596295f5dea3d074c017a28f0 /usr.bin/mkimg
parent29dd35a1c65e2c5b8325855db8973cf442e1b146 (diff)
downloadFreeBSD-src-162b419db0120c29b07529d37bbb99ec2b79ffbd.zip
FreeBSD-src-162b419db0120c29b07529d37bbb99ec2b79ffbd.tar.gz
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.
Diffstat (limited to 'usr.bin/mkimg')
-rw-r--r--usr.bin/mkimg/format.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/usr.bin/mkimg/format.c b/usr.bin/mkimg/format.c
index 57bbd98..a21b08a 100644
--- a/usr.bin/mkimg/format.c
+++ b/usr.bin/mkimg/format.c
@@ -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);
}
OpenPOWER on IntegriCloud