diff options
-rw-r--r-- | util-linux/mkfs_ext2.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/util-linux/mkfs_ext2.c b/util-linux/mkfs_ext2.c index 10f7f5fb4..ea35e5287 100644 --- a/util-linux/mkfs_ext2.c +++ b/util-linux/mkfs_ext2.c | |||
@@ -233,7 +233,8 @@ int mkfs_ext2_main(int argc UNUSED_PARAM, char **argv) | |||
233 | kilobytes = xatoull(argv[1]); | 233 | kilobytes = xatoull(argv[1]); |
234 | // seek past end fails on block devices but works on files | 234 | // seek past end fails on block devices but works on files |
235 | if (lseek(fd, kilobytes * 1024 - 1, SEEK_SET) != (off_t)-1) { | 235 | if (lseek(fd, kilobytes * 1024 - 1, SEEK_SET) != (off_t)-1) { |
236 | xwrite(fd, "", 1); // file grows if needed | 236 | if (!(opts & OPT_n)) |
237 | xwrite(fd, "", 1); // file grows if needed | ||
237 | } | 238 | } |
238 | //else { | 239 | //else { |
239 | // bb_error_msg("warning, block device is smaller"); | 240 | // bb_error_msg("warning, block device is smaller"); |