From 4af99ce07c5d58e878672e174d267324e1983ba1 Mon Sep 17 00:00:00 2001 From: bde Date: Sun, 28 Jun 1998 19:23:03 +0000 Subject: Fixed printf format errors. --- sbin/fsck_ffs/dir.c | 4 ++-- sbin/fsck_ffs/inode.c | 15 ++++++++------- sbin/fsck_ffs/pass1.c | 15 +++++++-------- sbin/fsck_ffs/pass5.c | 4 ++-- sbin/fsck_ffs/setup.c | 5 +++-- 5 files changed, 22 insertions(+), 21 deletions(-) (limited to 'sbin/fsck_ffs') diff --git a/sbin/fsck_ffs/dir.c b/sbin/fsck_ffs/dir.c index ac34c6f..7b22b17 100644 --- a/sbin/fsck_ffs/dir.c +++ b/sbin/fsck_ffs/dir.c @@ -36,7 +36,7 @@ static const char sccsid[] = "@(#)dir.c 8.8 (Berkeley) 4/28/95"; #endif static const char rcsid[] = - "$Id$"; + "$Id: dir.c,v 1.10 1998/06/15 07:07:10 charnier Exp $"; #endif /* not lint */ #include @@ -493,7 +493,7 @@ linkup(orphan, parentdir) lncntp[lfdir]++; pwarn("DIR I=%lu CONNECTED. ", orphan); if (parentdir != (ino_t)-1) { - printf("PARENT WAS I=%lu\n", parentdir); + printf("PARENT WAS I=%lu\n", (u_long)parentdir); /* * The parent directory, because of the ordering * guarantees, has had the link count incremented diff --git a/sbin/fsck_ffs/inode.c b/sbin/fsck_ffs/inode.c index 8d642c7..d079841 100644 --- a/sbin/fsck_ffs/inode.c +++ b/sbin/fsck_ffs/inode.c @@ -36,7 +36,7 @@ static const char sccsid[] = "@(#)inode.c 8.8 (Berkeley) 4/28/95"; #endif static const char rcsid[] = - "$Id$"; + "$Id: inode.c,v 1.14 1998/06/15 07:07:12 charnier Exp $"; #endif /* not lint */ #include @@ -182,7 +182,7 @@ iblock(idesc, ilevel, isize) if (*ap == 0) continue; (void)sprintf(buf, "PARTIALLY TRUNCATED INODE I=%lu", - idesc->id_number); + (u_long)idesc->id_number); if (dofix(idesc, buf)) { *ap = 0; dirty(bp); @@ -246,9 +246,10 @@ chkrange(blk, cnt) if ((blk + cnt) > cgsblock(&sblock, c)) { if (debug) { printf("blk %ld < cgdmin %ld;", - blk, cgdmin(&sblock, c)); + (long)blk, (long)cgdmin(&sblock, c)); printf(" blk + cnt %ld > cgsbase %ld\n", - blk + cnt, cgsblock(&sblock, c)); + (long)(blk + cnt), + (long)cgsblock(&sblock, c)); } return (1); } @@ -256,9 +257,9 @@ chkrange(blk, cnt) if ((blk + cnt) > cgbase(&sblock, c+1)) { if (debug) { printf("blk %ld >= cgdmin %ld;", - blk, cgdmin(&sblock, c)); + (long)blk, (long)cgdmin(&sblock, c)); printf(" blk + cnt %ld > sblock.fs_fpg %ld\n", - blk+cnt, sblock.fs_fpg); + (long)(blk + cnt), (long)sblock.fs_fpg); } return (1); } @@ -506,7 +507,7 @@ pinode(ino) struct passwd *pw; time_t t; - printf(" I=%lu ", ino); + printf(" I=%lu ", (u_long)ino); if (ino < ROOTINO || ino > maxino) return; dp = ginode(ino); diff --git a/sbin/fsck_ffs/pass1.c b/sbin/fsck_ffs/pass1.c index 3ad7e61..3e0ef88 100644 --- a/sbin/fsck_ffs/pass1.c +++ b/sbin/fsck_ffs/pass1.c @@ -32,14 +32,11 @@ */ #ifndef lint -#if 0 static const char sccsid[] = "@(#)pass1.c 8.6 (Berkeley) 4/28/95"; -#endif -static const char rcsid[] = - "$Id$"; #endif /* not lint */ #include +#include #include #include @@ -157,8 +154,9 @@ checkinode(inumber, idesc) errx(EEXIT, "cannot read symlink"); if (debug) { symbuf[dp->di_size] = 0; - printf("convert symlink %ld(%s) of size %ld\n", - inumber, symbuf, (long)dp->di_size); + printf("convert symlink %lu(%s) of size %ld\n", + (u_long)inumber, symbuf, + (long)dp->di_size); } dp = ginode(inumber); memmove(dp->di_shortlink, symbuf, (long)dp->di_size); @@ -183,7 +181,8 @@ checkinode(inumber, idesc) for (j = ndb; j < NDADDR; j++) if (dp->di_db[j] != 0) { if (debug) - printf("bad direct addr: %ld\n", dp->di_db[j]); + printf("bad direct addr: %ld\n", + (long)dp->di_db[j]); goto unknown; } for (j = 0, ndb -= NDADDR; ndb > 0; j++) @@ -192,7 +191,7 @@ checkinode(inumber, idesc) if (dp->di_ib[j] != 0) { if (debug) printf("bad indirect addr: %ld\n", - dp->di_ib[j]); + (long)dp->di_ib[j]); goto unknown; } if (ftypeok(dp) == 0) diff --git a/sbin/fsck_ffs/pass5.c b/sbin/fsck_ffs/pass5.c index 7d913a4..dadfad1 100644 --- a/sbin/fsck_ffs/pass5.c +++ b/sbin/fsck_ffs/pass5.c @@ -36,7 +36,7 @@ static const char sccsid[] = "@(#)pass5.c 8.9 (Berkeley) 4/28/95"; #endif static const char rcsid[] = - "$Id$"; + "$Id: pass5.c,v 1.11 1998/06/15 07:07:19 charnier Exp $"; #endif /* not lint */ #include @@ -228,7 +228,7 @@ pass5() default: if (j < ROOTINO) break; - errx(EEXIT, "BAD STATE %d FOR INODE I=%d", + errx(EEXIT, "BAD STATE %d FOR INODE I=%ld", statemap[j], j); } } diff --git a/sbin/fsck_ffs/setup.c b/sbin/fsck_ffs/setup.c index 308dfd0..25dab92 100644 --- a/sbin/fsck_ffs/setup.c +++ b/sbin/fsck_ffs/setup.c @@ -36,7 +36,7 @@ static const char sccsid[] = "@(#)setup.c 8.10 (Berkeley) 5/9/95"; #endif static const char rcsid[] = - "$Id$"; + "$Id: setup.c,v 1.11 1998/06/15 07:07:21 charnier Exp $"; #endif /* not lint */ #define DKTYPENAMES @@ -415,7 +415,8 @@ readsb(listerr) for ( ; olp < endlp; olp++, nlp++) { if (*olp == *nlp) continue; - printf("offset %d, original %d, alternate %d\n", + printf( + "offset %d, original %ld, alternate %ld\n", olp - (long *)&sblock, *olp, *nlp); } } -- cgit v1.1