diff options
author | Denys Vlasenko <vda.linux@googlemail.com> | 2012-01-11 01:02:31 +0100 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2012-01-11 01:02:31 +0100 |
commit | 7550201e9ac93e885e98feca1739921f73efcabd (patch) | |
tree | e1efb2d62b55ba0f6fce8efa8389d87ac6334e1b | |
parent | 499597d6efb0de5bb6d6f52bda1f348478d7f5a9 (diff) | |
download | busybox-w32-7550201e9ac93e885e98feca1739921f73efcabd.tar.gz busybox-w32-7550201e9ac93e885e98feca1739921f73efcabd.tar.bz2 busybox-w32-7550201e9ac93e885e98feca1739921f73efcabd.zip |
mke2fs: do not zero out first kilobyte. Closes 3247
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
-rw-r--r-- | util-linux/mkfs_ext2.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/util-linux/mkfs_ext2.c b/util-linux/mkfs_ext2.c index f6ccc9c9e..6cbbe0e07 100644 --- a/util-linux/mkfs_ext2.c +++ b/util-linux/mkfs_ext2.c | |||
@@ -615,7 +615,11 @@ int mkfs_ext2_main(int argc UNUSED_PARAM, char **argv) | |||
615 | 615 | ||
616 | // zero boot sectors | 616 | // zero boot sectors |
617 | memset(buf, 0, blocksize); | 617 | memset(buf, 0, blocksize); |
618 | PUT(0, buf, 1024); // N.B. 1024 <= blocksize, so buf[0..1023] contains zeros | 618 | // Disabled: standard mke2fs doesn't do this, and |
619 | // on SPARC this destroys Sun disklabel. | ||
620 | // Users who need/want zeroing can easily do it with dd. | ||
621 | //PUT(0, buf, 1024); // N.B. 1024 <= blocksize, so buf[0..1023] contains zeros | ||
622 | |||
619 | // zero inode tables | 623 | // zero inode tables |
620 | for (i = 0; i < ngroups; ++i) | 624 | for (i = 0; i < ngroups; ++i) |
621 | for (n = 0; n < inode_table_blocks; ++n) | 625 | for (n = 0; n < inode_table_blocks; ++n) |