From 4537ca4ef67f74b95d2ef8429c52690b20d0bbbd Mon Sep 17 00:00:00 2001 From: Marcel Moolenaar Date: Sun, 21 Jun 2015 01:35:32 +0000 Subject: [PATCH] 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. --- usr.bin/mkimg/format.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/usr.bin/mkimg/format.c b/usr.bin/mkimg/format.c index 57bbd98d047..a21b08ad0e7 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); }