diff options
author | trasz <trasz@FreeBSD.org> | 2012-05-06 11:48:37 +0000 |
---|---|---|
committer | trasz <trasz@FreeBSD.org> | 2012-05-06 11:48:37 +0000 |
commit | 9a3b66f310897ac5d572ba3892d80b0b141f522f (patch) | |
tree | e57b0d5cf76bb0dc56c78cd2b354d30b07f66365 /sbin/growfs/growfs.c | |
parent | 38b6dab7f6b0759d69ada99916f5d8885ff189a2 (diff) | |
download | FreeBSD-src-9a3b66f310897ac5d572ba3892d80b0b141f522f.zip FreeBSD-src-9a3b66f310897ac5d572ba3892d80b0b141f522f.tar.gz |
Fix offset calculation to actually rewrite the _last_ block.
Diffstat (limited to 'sbin/growfs/growfs.c')
-rw-r--r-- | sbin/growfs/growfs.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sbin/growfs/growfs.c b/sbin/growfs/growfs.c index aee4c40..b610bd2 100644 --- a/sbin/growfs/growfs.c +++ b/sbin/growfs/growfs.c @@ -1567,9 +1567,9 @@ main(int argc, char **argv) testbuf = malloc(sblock.fs_fsize); if (testbuf == NULL) err(1, "malloc"); - rdfs((ufs2_daddr_t)((size / DEV_BSIZE) - sblock.fs_fsize), + rdfs((ufs2_daddr_t)((size - sblock.fs_fsize) / DEV_BSIZE), sblock.fs_fsize, testbuf, fsi); - wtfs((ufs2_daddr_t)((size / DEV_BSIZE) - sblock.fs_fsize), + wtfs((ufs2_daddr_t)((size - sblock.fs_fsize) / DEV_BSIZE), sblock.fs_fsize, testbuf, fso, Nflag); free(testbuf); |