summaryrefslogtreecommitdiff
path: root/sbin/fsck_ffs
diff options
context:
space:
mode:
authorKenneth R Westerback <krw@cvs.openbsd.org>2014-05-24 14:54:50 +0000
committerKenneth R Westerback <krw@cvs.openbsd.org>2014-05-24 14:54:50 +0000
commit1a17621c54374b8215a4d84653a6674dc286437c (patch)
treeda420fc732f7ff55d66357f11e346af71147ac57 /sbin/fsck_ffs
parent5fafd3d24a68c49123e7094dea97c07a18a088a1 (diff)
Use consistent format specifiers (%lld) and casts (long long) when
printing out block numbers and sector numbers. Make output verbiage consistent. -Wall happier. Original diff and ok chl@
Diffstat (limited to 'sbin/fsck_ffs')
-rw-r--r--sbin/fsck_ffs/utilities.c20
1 files changed, 9 insertions, 11 deletions
diff --git a/sbin/fsck_ffs/utilities.c b/sbin/fsck_ffs/utilities.c
index 55f51e3527f..a1d292684d8 100644
--- a/sbin/fsck_ffs/utilities.c
+++ b/sbin/fsck_ffs/utilities.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: utilities.c,v 1.45 2014/05/21 18:53:05 krw Exp $ */
+/* $OpenBSD: utilities.c,v 1.46 2014/05/24 14:54:49 krw Exp $ */
/* $NetBSD: utilities.c,v 1.18 1996/09/27 22:45:20 christos Exp $ */
/*
@@ -349,12 +349,11 @@ bread(int fd, char *buf, daddr_t blk, long size)
if (pread(fd, cp, secsize, offset + i) != secsize) {
if (secsize != DEV_BSIZE)
printf(" %lld (%lld),",
- (long long)((blk * DEV_BSIZE + i) /
- secsize),
- (long long)(blk + i / DEV_BSIZE));
+ (long long)(offset + i) / secsize,
+ (long long)blk + i / DEV_BSIZE);
else
- printf(" %lld,",
- (long long)(blk + i / DEV_BSIZE));
+ printf(" %lld,", (long long)blk +
+ i / DEV_BSIZE);
errs++;
}
}
@@ -383,12 +382,11 @@ bwrite(int fd, char *buf, daddr_t blk, long size)
if (pwrite(fd, cp, secsize, offset + i) != secsize) {
if (secsize != DEV_BSIZE)
printf(" %lld (%lld),",
- (long long)((blk * DEV_BSIZE + i) /
- secsize),
- (long long)(blk + i / DEV_BSIZE));
+ (long long)(offset + i) / secsize,
+ (long long)blk + i / DEV_BSIZE);
else
- printf(" %lld,",
- (long long)(blk + i / DEV_BSIZE));
+ printf(" %lld,", (long long)blk +
+ i / DEV_BSIZE);
}
printf("\n");
return;