diff options
author | 2013-11-01 17:36:18 +0000 | |
---|---|---|
committer | 2013-11-01 17:36:18 +0000 | |
commit | bb4f4fae8132f3b14bed71a1a1cb238b951b5284 (patch) | |
tree | 0b11730be7bc12cb165b8ea02e23955cf3ef808c /sbin/badsect/badsect.c | |
parent | Reduce the differences with ehci(4)'s transfer decriptors. This is a (diff) | |
download | wireguard-openbsd-bb4f4fae8132f3b14bed71a1a1cb238b951b5284.tar.xz wireguard-openbsd-bb4f4fae8132f3b14bed71a1a1cb238b951b5284.zip |
Sprinkle (long long) casts where %lld is being used to print daddr_t
variables. Some random whitespace/knf repairs encountered on the way.
ok miod@ on inspection, feedback & more suggestions from millert@
Diffstat (limited to 'sbin/badsect/badsect.c')
-rw-r--r-- | sbin/badsect/badsect.c | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/sbin/badsect/badsect.c b/sbin/badsect/badsect.c index 4c9f54b87bd..4deed201175 100644 --- a/sbin/badsect/badsect.c +++ b/sbin/badsect/badsect.c @@ -1,4 +1,4 @@ -/* $OpenBSD: badsect.c,v 1.21 2013/06/11 16:42:02 deraadt Exp $ */ +/* $OpenBSD: badsect.c,v 1.22 2013/11/01 17:36:18 krw Exp $ */ /* $NetBSD: badsect.c,v 1.10 1995/03/18 14:54:28 cgd Exp $ */ /* @@ -147,20 +147,21 @@ chkuse(daddr_t blkno, int cnt) fsbn = dbtofsb(fs, blkno); if (fsbn+cnt > fs->fs_ffs1_size) { - fprintf(stderr, "block %lld out of range of file system\n", blkno); + fprintf(stderr, "block %lld out of range of file system\n", + (long long)blkno); return (1); } cg = dtog(fs, fsbn); if (fsbn < cgdmin(fs, cg)) { if (cg == 0 || (fsbn+cnt) > cgsblock(fs, cg)) { - fprintf(stderr, "block %lld in non-data area: cannot attach\n", - blkno); + fprintf(stderr, "block %lld in non-data area: cannot " + "attach\n", (long long)blkno); return (1); } } else { if ((fsbn+cnt) > cgbase(fs, cg+1)) { - fprintf(stderr, "block %lld in non-data area: cannot attach\n", - blkno); + fprintf(stderr, "block %lld in non-data area: cannot " + "attach\n", (long long)blkno); return (1); } } @@ -173,7 +174,8 @@ chkuse(daddr_t blkno, int cnt) } bn = dtogd(fs, fsbn); if (isclr(cg_blksfree(&acg), bn)) - fprintf(stderr, "Warning: sector %lld is in use\n", blkno); + fprintf(stderr, "Warning: sector %lld is in use\n", + (long long)blkno); return (0); } |