aboutsummaryrefslogtreecommitdiff
path: root/sbin
diff options
context:
space:
mode:
authorBruce Evans <bde@FreeBSD.org>1998-06-28 19:23:03 +0000
committerBruce Evans <bde@FreeBSD.org>1998-06-28 19:23:03 +0000
commitb10466261eb1af53e92a3cc63f424c3e191a0520 (patch)
treeb0f10539cbcf1777a6eb463b39a7a013bb3258ea /sbin
parentba31b45080b304133affc792fc2efe6435b70f64 (diff)
downloadsrc-b10466261eb1af53e92a3cc63f424c3e191a0520.tar.gz
src-b10466261eb1af53e92a3cc63f424c3e191a0520.zip
Fixed printf format errors.
Notes
Notes: svn path=/head/; revision=37236
Diffstat (limited to 'sbin')
-rw-r--r--sbin/fsck/dir.c4
-rw-r--r--sbin/fsck/inode.c15
-rw-r--r--sbin/fsck/pass1.c15
-rw-r--r--sbin/fsck/pass5.c4
-rw-r--r--sbin/fsck/setup.c5
-rw-r--r--sbin/fsck_ffs/dir.c4
-rw-r--r--sbin/fsck_ffs/inode.c15
-rw-r--r--sbin/fsck_ffs/pass1.c15
-rw-r--r--sbin/fsck_ffs/pass5.c4
-rw-r--r--sbin/fsck_ffs/setup.c5
-rw-r--r--sbin/fsck_ifs/dir.c4
-rw-r--r--sbin/fsck_ifs/inode.c15
-rw-r--r--sbin/fsck_ifs/pass1.c15
-rw-r--r--sbin/fsck_ifs/pass5.c4
-rw-r--r--sbin/fsck_ifs/setup.c5
15 files changed, 66 insertions, 63 deletions
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 <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
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 <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);
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 <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)
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 <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);
}
}
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 <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
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 <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);
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 <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)
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 <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);
}
}
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 <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
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 <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);
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 <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)
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 <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);
}
}
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);
}
}