diff options
author | James Cameron <quozl@laptop.org> | 2012-04-12 23:19:10 (GMT) |
---|---|---|
committer | James Cameron <quozl@laptop.org> | 2012-04-12 23:19:10 (GMT) |
commit | 5b1965da4632fb6df94b69d10e6dac4b37d589b0 (patch) | |
tree | 92ec922e224e87841ec399cc0caffcffb6b56b4d | |
parent | 63d77720a89ef4142330198640b3e45d6960adee (diff) |
wipe the partition table first, #11776
-rw-r--r-- | bin/zhashfs.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/bin/zhashfs.c b/bin/zhashfs.c index dd712ae..9832f31 100644 --- a/bin/zhashfs.c +++ b/bin/zhashfs.c @@ -241,6 +241,10 @@ int main(int argc, char **argv) fprintf(stdout, "Total blocks: %ld\n", eblocks); + /* wipe the partition table first in case of partial completion */ + memset(buf, 0, zblocksize); + write_block(0, buf); + /* make a hash of the file */ for (i=1; i < eblocks; i++) { if (!eblocks_used[i]) |