Fixed printf format errors.

This commit is contained in:
Bruce Evans 1998-06-28 19:23:03 +00:00
parent ba31b45080
commit b10466261e
15 changed files with 66 additions and 63 deletions

View File

@ -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 <sys/param.h>
@ -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

View File

@ -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 <sys/param.h>
@ -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);

View File

@ -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 <sys/param.h>
#include <sys/time.h>
#include <ufs/ufs/dinode.h>
#include <ufs/ufs/dir.h>
@ -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)

View File

@ -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 <sys/param.h>
@ -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);
}
}

View File

@ -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);
}
}

View File

@ -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 <sys/param.h>
@ -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

View File

@ -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 <sys/param.h>
@ -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);

View File

@ -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 <sys/param.h>
#include <sys/time.h>
#include <ufs/ufs/dinode.h>
#include <ufs/ufs/dir.h>
@ -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)

View File

@ -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 <sys/param.h>
@ -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);
}
}

View File

@ -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);
}
}

View File

@ -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 <sys/param.h>
@ -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

View File

@ -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 <sys/param.h>
@ -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);

View File

@ -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 <sys/param.h>
#include <sys/time.h>
#include <ufs/ufs/dinode.h>
#include <ufs/ufs/dir.h>
@ -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)

View File

@ -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 <sys/param.h>
@ -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);
}
}

View File

@ -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);
}
}