diff --git a/sbin/fsck/dir.c b/sbin/fsck/dir.c index ac34c6fc1cce..7b22b17df9e7 100644 --- a/sbin/fsck/dir.c +++ b/sbin/fsck/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/inode.c b/sbin/fsck/inode.c index 8d642c73ce7b..d079841e05b0 100644 --- a/sbin/fsck/inode.c +++ b/sbin/fsck/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/pass1.c b/sbin/fsck/pass1.c index 3ad7e61e3b7f..3e0ef88b12bf 100644 --- a/sbin/fsck/pass1.c +++ b/sbin/fsck/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/pass5.c b/sbin/fsck/pass5.c index 7d913a447add..dadfad1facd2 100644 --- a/sbin/fsck/pass5.c +++ b/sbin/fsck/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/setup.c b/sbin/fsck/setup.c index 308dfd0e3e24..25dab92ad56d 100644 --- a/sbin/fsck/setup.c +++ b/sbin/fsck/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); } } diff --git a/sbin/fsck_ffs/dir.c b/sbin/fsck_ffs/dir.c index ac34c6fc1cce..7b22b17df9e7 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 8d642c73ce7b..d079841e05b0 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 3ad7e61e3b7f..3e0ef88b12bf 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 7d913a447add..dadfad1facd2 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 308dfd0e3e24..25dab92ad56d 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); } } diff --git a/sbin/fsck_ifs/dir.c b/sbin/fsck_ifs/dir.c index ac34c6fc1cce..7b22b17df9e7 100644 --- a/sbin/fsck_ifs/dir.c +++ b/sbin/fsck_ifs/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_ifs/inode.c b/sbin/fsck_ifs/inode.c index 8d642c73ce7b..d079841e05b0 100644 --- a/sbin/fsck_ifs/inode.c +++ b/sbin/fsck_ifs/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_ifs/pass1.c b/sbin/fsck_ifs/pass1.c index 3ad7e61e3b7f..3e0ef88b12bf 100644 --- a/sbin/fsck_ifs/pass1.c +++ b/sbin/fsck_ifs/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_ifs/pass5.c b/sbin/fsck_ifs/pass5.c index 7d913a447add..dadfad1facd2 100644 --- a/sbin/fsck_ifs/pass5.c +++ b/sbin/fsck_ifs/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_ifs/setup.c b/sbin/fsck_ifs/setup.c index 308dfd0e3e24..25dab92ad56d 100644 --- a/sbin/fsck_ifs/setup.c +++ b/sbin/fsck_ifs/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); } }