summaryrefslogtreecommitdiffstats
path: root/sbin/dumpfs
diff options
context:
space:
mode:
authorpeter <peter@FreeBSD.org>1996-06-23 00:05:04 +0000
committerpeter <peter@FreeBSD.org>1996-06-23 00:05:04 +0000
commit052dfa09a1a1897163534e475f4125cd8e42b596 (patch)
tree6298208fb065bfce3002162a827714d74b63b2e5 /sbin/dumpfs
parent5adad2cb6b995e035c065e09ab0044af51bb37dc (diff)
downloadFreeBSD-src-052dfa09a1a1897163534e475f4125cd8e42b596.zip
FreeBSD-src-052dfa09a1a1897163534e475f4125cd8e42b596.tar.gz
Fix a couple of bogus casts to off_t that caused dumpfs to lseek negative
on filesystems > 2GB (which causes the disk slice code to call Debugger!!)
Diffstat (limited to 'sbin/dumpfs')
-rw-r--r--sbin/dumpfs/dumpfs.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/sbin/dumpfs/dumpfs.c b/sbin/dumpfs/dumpfs.c
index a899c9b..34b0674 100644
--- a/sbin/dumpfs/dumpfs.c
+++ b/sbin/dumpfs/dumpfs.c
@@ -183,8 +183,8 @@ dumpfs(name)
afs.fs_cssize - i : afs.fs_bsize;
afs.fs_csp[j] = calloc(1, size);
if (lseek(fd,
- (off_t)(fsbtodb(&afs, (afs.fs_csaddr + j * afs.fs_frag)) *
- dev_bsize), SEEK_SET) == (off_t)-1)
+ (off_t)(fsbtodb(&afs, (afs.fs_csaddr + j * afs.fs_frag))) *
+ (off_t)dev_bsize, SEEK_SET) == (off_t)-1)
goto err;
if (read(fd, afs.fs_csp[j], size) != size)
goto err;
@@ -225,8 +225,8 @@ dumpcg(name, fd, c)
int i, j;
printf("\ncg %d:\n", c);
- if ((cur = lseek(fd, (off_t)(fsbtodb(&afs, cgtod(&afs, c)) * dev_bsize),
- SEEK_SET)) == (off_t)-1)
+ if ((cur = lseek(fd, (off_t)(fsbtodb(&afs, cgtod(&afs, c))) *
+ (off_t)dev_bsize, SEEK_SET)) == (off_t)-1)
return (1);
if (read(fd, &acg, afs.fs_bsize) != afs.fs_bsize) {
(void)fprintf(stderr, "dumpfs: %s: error reading cg\n", name);
OpenPOWER on IntegriCloud