summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbde <bde@FreeBSD.org>1998-06-28 20:25:59 +0000
committerbde <bde@FreeBSD.org>1998-06-28 20:25:59 +0000
commitc19967f2fc42950d997012faec049842753a8846 (patch)
tree4518f3efec93e4242c527ea1e727bcbd6040f408
parentfa160a825f17be981fcf9ed627e0809166cc5fdd (diff)
downloadFreeBSD-src-c19967f2fc42950d997012faec049842753a8846.zip
FreeBSD-src-c19967f2fc42950d997012faec049842753a8846.tar.gz
Fixed printf format errors. Sure is dusty here.
-rw-r--r--sbin/restore/dirs.c4
-rw-r--r--sbin/restore/tape.c31
-rw-r--r--sbin/restore/utilities.c4
3 files changed, 20 insertions, 19 deletions
diff --git a/sbin/restore/dirs.c b/sbin/restore/dirs.c
index 78a5ff3..4276454 100644
--- a/sbin/restore/dirs.c
+++ b/sbin/restore/dirs.c
@@ -35,7 +35,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: dirs.c,v 1.9 1997/06/18 06:28:46 charnier Exp $
+ * $Id: dirs.c,v 1.10 1997/09/18 14:04:49 phk Exp $
*/
#ifndef lint
@@ -470,7 +470,7 @@ rst_seekdir(dirp, loc, base)
return;
loc -= base;
if (loc < 0)
- fprintf(stderr, "bad seek pointer to rst_seekdir %d\n", loc);
+ fprintf(stderr, "bad seek pointer to rst_seekdir %ld\n", loc);
(void) lseek(dirp->dd_fd, base + (loc & ~(DIRBLKSIZ - 1)), SEEK_SET);
dirp->dd_loc = loc & (DIRBLKSIZ - 1);
if (dirp->dd_loc != 0)
diff --git a/sbin/restore/tape.c b/sbin/restore/tape.c
index 6cb9fd1..597b0ba 100644
--- a/sbin/restore/tape.c
+++ b/sbin/restore/tape.c
@@ -236,7 +236,7 @@ setup()
if (stbuf.st_blksize >= TP_BSIZE && stbuf.st_blksize <= MAXBSIZE)
fssize = stbuf.st_blksize;
if (((fssize - 1) & fssize) != 0) {
- fprintf(stderr, "bad block size %d\n", fssize);
+ fprintf(stderr, "bad block size %ld\n", fssize);
done(1);
}
if (spcl.c_volume != 1) {
@@ -244,7 +244,7 @@ setup()
done(1);
}
if (gethead(&spcl) == FAIL) {
- dprintf(stdout, "header read failed at %d blocks\n", blksread);
+ dprintf(stdout, "header read failed at %ld blocks\n", blksread);
panic("no header after volume mark!\n");
}
findinode(&spcl);
@@ -330,7 +330,7 @@ again:
strcpy(buf, ": ");
for (i = 1; i < 32; i++)
if (tapesread & (1 << i)) {
- fprintf(stderr, "%s%d", buf, i);
+ fprintf(stderr, "%s%ld", buf, i);
strcpy(buf, ", ");
}
fprintf(stderr, "\n");
@@ -353,7 +353,7 @@ again:
return;
}
closemt();
- fprintf(stderr, "Mount tape volume %d\n", newvol);
+ fprintf(stderr, "Mount tape volume %ld\n", newvol);
fprintf(stderr, "Enter ``none'' if there are no more tapes\n");
fprintf(stderr, "otherwise enter tape name (default: %s) ", magtape);
(void) fflush(stderr);
@@ -385,13 +385,13 @@ gethdr:
setdumpnum();
FLUSHTAPEBUF();
if (gethead(&tmpbuf) == FAIL) {
- dprintf(stdout, "header read failed at %d blocks\n", blksread);
+ dprintf(stdout, "header read failed at %ld blocks\n", blksread);
fprintf(stderr, "tape is not dump tape\n");
volno = 0;
goto again;
}
if (tmpbuf.c_volume != volno) {
- fprintf(stderr, "Wrong volume (%d)\n", tmpbuf.c_volume);
+ fprintf(stderr, "Wrong volume (%ld)\n", tmpbuf.c_volume);
volno = 0;
goto again;
}
@@ -424,7 +424,7 @@ gethdr:
* -1 since we've read the volume header
*/
i = tpblksread - tmpbuf.c_firstrec - 1;
- dprintf(stderr, "Skipping %d duplicate record%s.\n",
+ dprintf(stderr, "Skipping %ld duplicate record%s.\n",
i, i > 1 ? "s" : "");
while (--i >= 0)
readtape(buf);
@@ -504,7 +504,7 @@ printdumpinfo()
(spcl.c_ddate == 0) ? "the epoch\n" : ctime(&spcl.c_ddate));
if (spcl.c_host[0] == '\0')
return;
- fprintf(stderr, "Level %d dump of %s on %s:%s\n",
+ fprintf(stderr, "Level %ld dump of %s on %s:%s\n",
spcl.c_level, spcl.c_filesys, spcl.c_host, spcl.c_dev);
fprintf(stderr, "Label: %s\n", spcl.c_label);
}
@@ -706,7 +706,7 @@ loop:
if (spcl.c_type == TS_ADDR)
goto loop;
dprintf(stdout,
- "Missing address (header) block for %s at %d blocks\n",
+ "Missing address (header) block for %s at %ld blocks\n",
curfile.name, blksread);
}
if (curblk > 0)
@@ -881,7 +881,7 @@ getmore:
*/
if (i % TP_BSIZE != 0)
vprintf(stdout,
- "partial block read: %d should be %d\n",
+ "partial block read: %ld should be %ld\n",
i, ntrec * TP_BSIZE);
numtrec = i / TP_BSIZE;
}
@@ -968,13 +968,13 @@ findtapeblksize()
done(1);
}
if (i % TP_BSIZE != 0) {
- fprintf(stderr, "Tape block size (%d) %s (%d)\n",
+ fprintf(stderr, "Tape block size (%ld) %s (%d)\n",
i, "is not a multiple of dump block size", TP_BSIZE);
done(1);
}
ntrec = i / TP_BSIZE;
numtrec = ntrec;
- vprintf(stdout, "Tape block size is %d\n", ntrec);
+ vprintf(stdout, "Tape block size is %ld\n", ntrec);
}
void
@@ -1154,7 +1154,7 @@ accthdr(header)
fprintf(stderr, "Volume header (%s inode format) ",
oldinofmt ? "old" : "new");
if (header->c_firstrec)
- fprintf(stderr, "begins with record %d",
+ fprintf(stderr, "begins with record %ld",
header->c_firstrec);
fprintf(stderr, "\n");
previno = 0x7fffffff;
@@ -1180,7 +1180,7 @@ accthdr(header)
break;
}
if (predict != blksread - 1)
- fprintf(stderr, "; predicted %d blocks, got %d blocks",
+ fprintf(stderr, "; predicted %ld blocks, got %ld blocks",
predict, blksread - 1);
fprintf(stderr, "\n");
newcalc:
@@ -1260,7 +1260,8 @@ findinode(header)
}
} while (header->c_type == TS_ADDR);
if (skipcnt > 0)
- fprintf(stderr, "resync restore, skipped %d blocks\n", skipcnt);
+ fprintf(stderr, "resync restore, skipped %ld blocks\n",
+ skipcnt);
skipcnt = 0;
}
diff --git a/sbin/restore/utilities.c b/sbin/restore/utilities.c
index 5eec4de..3232b9b 100644
--- a/sbin/restore/utilities.c
+++ b/sbin/restore/utilities.c
@@ -114,7 +114,7 @@ gentempname(ep)
i++;
if (np == NULL)
badentry(ep, "not on ino list");
- (void) sprintf(name, "%s%d%d", TMPHDR, i, ep->e_ino);
+ (void) sprintf(name, "%s%ld%lu", TMPHDR, i, (u_long)ep->e_ino);
return (name);
}
@@ -333,7 +333,7 @@ badentry(ep, msg)
"next hashchain name: %s\n", myname(ep->e_next));
fprintf(stderr, "entry type: %s\n",
ep->e_type == NODE ? "NODE" : "LEAF");
- fprintf(stderr, "inode number: %ld\n", ep->e_ino);
+ fprintf(stderr, "inode number: %lu\n", (u_long)ep->e_ino);
panic("flags: %s\n", flagvalues(ep));
}
OpenPOWER on IntegriCloud