Fixed printf format errors. Sure is dusty here.
This commit is contained in:
parent
ca46ad5f48
commit
7fafc6f67c
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=37240
@ -35,7 +35,7 @@
|
|||||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||||
* SUCH DAMAGE.
|
* 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
|
#ifndef lint
|
||||||
@ -470,7 +470,7 @@ rst_seekdir(dirp, loc, base)
|
|||||||
return;
|
return;
|
||||||
loc -= base;
|
loc -= base;
|
||||||
if (loc < 0)
|
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);
|
(void) lseek(dirp->dd_fd, base + (loc & ~(DIRBLKSIZ - 1)), SEEK_SET);
|
||||||
dirp->dd_loc = loc & (DIRBLKSIZ - 1);
|
dirp->dd_loc = loc & (DIRBLKSIZ - 1);
|
||||||
if (dirp->dd_loc != 0)
|
if (dirp->dd_loc != 0)
|
||||||
|
@ -236,7 +236,7 @@ setup()
|
|||||||
if (stbuf.st_blksize >= TP_BSIZE && stbuf.st_blksize <= MAXBSIZE)
|
if (stbuf.st_blksize >= TP_BSIZE && stbuf.st_blksize <= MAXBSIZE)
|
||||||
fssize = stbuf.st_blksize;
|
fssize = stbuf.st_blksize;
|
||||||
if (((fssize - 1) & fssize) != 0) {
|
if (((fssize - 1) & fssize) != 0) {
|
||||||
fprintf(stderr, "bad block size %d\n", fssize);
|
fprintf(stderr, "bad block size %ld\n", fssize);
|
||||||
done(1);
|
done(1);
|
||||||
}
|
}
|
||||||
if (spcl.c_volume != 1) {
|
if (spcl.c_volume != 1) {
|
||||||
@ -244,7 +244,7 @@ setup()
|
|||||||
done(1);
|
done(1);
|
||||||
}
|
}
|
||||||
if (gethead(&spcl) == FAIL) {
|
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");
|
panic("no header after volume mark!\n");
|
||||||
}
|
}
|
||||||
findinode(&spcl);
|
findinode(&spcl);
|
||||||
@ -330,7 +330,7 @@ getvol(nextvol)
|
|||||||
strcpy(buf, ": ");
|
strcpy(buf, ": ");
|
||||||
for (i = 1; i < 32; i++)
|
for (i = 1; i < 32; i++)
|
||||||
if (tapesread & (1 << i)) {
|
if (tapesread & (1 << i)) {
|
||||||
fprintf(stderr, "%s%d", buf, i);
|
fprintf(stderr, "%s%ld", buf, i);
|
||||||
strcpy(buf, ", ");
|
strcpy(buf, ", ");
|
||||||
}
|
}
|
||||||
fprintf(stderr, "\n");
|
fprintf(stderr, "\n");
|
||||||
@ -353,7 +353,7 @@ getvol(nextvol)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
closemt();
|
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, "Enter ``none'' if there are no more tapes\n");
|
||||||
fprintf(stderr, "otherwise enter tape name (default: %s) ", magtape);
|
fprintf(stderr, "otherwise enter tape name (default: %s) ", magtape);
|
||||||
(void) fflush(stderr);
|
(void) fflush(stderr);
|
||||||
@ -385,13 +385,13 @@ getvol(nextvol)
|
|||||||
setdumpnum();
|
setdumpnum();
|
||||||
FLUSHTAPEBUF();
|
FLUSHTAPEBUF();
|
||||||
if (gethead(&tmpbuf) == FAIL) {
|
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");
|
fprintf(stderr, "tape is not dump tape\n");
|
||||||
volno = 0;
|
volno = 0;
|
||||||
goto again;
|
goto again;
|
||||||
}
|
}
|
||||||
if (tmpbuf.c_volume != volno) {
|
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;
|
volno = 0;
|
||||||
goto again;
|
goto again;
|
||||||
}
|
}
|
||||||
@ -424,7 +424,7 @@ getvol(nextvol)
|
|||||||
* -1 since we've read the volume header
|
* -1 since we've read the volume header
|
||||||
*/
|
*/
|
||||||
i = tpblksread - tmpbuf.c_firstrec - 1;
|
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" : "");
|
i, i > 1 ? "s" : "");
|
||||||
while (--i >= 0)
|
while (--i >= 0)
|
||||||
readtape(buf);
|
readtape(buf);
|
||||||
@ -504,7 +504,7 @@ printdumpinfo()
|
|||||||
(spcl.c_ddate == 0) ? "the epoch\n" : ctime(&spcl.c_ddate));
|
(spcl.c_ddate == 0) ? "the epoch\n" : ctime(&spcl.c_ddate));
|
||||||
if (spcl.c_host[0] == '\0')
|
if (spcl.c_host[0] == '\0')
|
||||||
return;
|
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);
|
spcl.c_level, spcl.c_filesys, spcl.c_host, spcl.c_dev);
|
||||||
fprintf(stderr, "Label: %s\n", spcl.c_label);
|
fprintf(stderr, "Label: %s\n", spcl.c_label);
|
||||||
}
|
}
|
||||||
@ -706,7 +706,7 @@ getfile(fill, skip)
|
|||||||
if (spcl.c_type == TS_ADDR)
|
if (spcl.c_type == TS_ADDR)
|
||||||
goto loop;
|
goto loop;
|
||||||
dprintf(stdout,
|
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);
|
curfile.name, blksread);
|
||||||
}
|
}
|
||||||
if (curblk > 0)
|
if (curblk > 0)
|
||||||
@ -881,7 +881,7 @@ readtape(buf)
|
|||||||
*/
|
*/
|
||||||
if (i % TP_BSIZE != 0)
|
if (i % TP_BSIZE != 0)
|
||||||
vprintf(stdout,
|
vprintf(stdout,
|
||||||
"partial block read: %d should be %d\n",
|
"partial block read: %ld should be %ld\n",
|
||||||
i, ntrec * TP_BSIZE);
|
i, ntrec * TP_BSIZE);
|
||||||
numtrec = i / TP_BSIZE;
|
numtrec = i / TP_BSIZE;
|
||||||
}
|
}
|
||||||
@ -968,13 +968,13 @@ findtapeblksize()
|
|||||||
done(1);
|
done(1);
|
||||||
}
|
}
|
||||||
if (i % TP_BSIZE != 0) {
|
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);
|
i, "is not a multiple of dump block size", TP_BSIZE);
|
||||||
done(1);
|
done(1);
|
||||||
}
|
}
|
||||||
ntrec = i / TP_BSIZE;
|
ntrec = i / TP_BSIZE;
|
||||||
numtrec = ntrec;
|
numtrec = ntrec;
|
||||||
vprintf(stdout, "Tape block size is %d\n", ntrec);
|
vprintf(stdout, "Tape block size is %ld\n", ntrec);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
@ -1154,7 +1154,7 @@ accthdr(header)
|
|||||||
fprintf(stderr, "Volume header (%s inode format) ",
|
fprintf(stderr, "Volume header (%s inode format) ",
|
||||||
oldinofmt ? "old" : "new");
|
oldinofmt ? "old" : "new");
|
||||||
if (header->c_firstrec)
|
if (header->c_firstrec)
|
||||||
fprintf(stderr, "begins with record %d",
|
fprintf(stderr, "begins with record %ld",
|
||||||
header->c_firstrec);
|
header->c_firstrec);
|
||||||
fprintf(stderr, "\n");
|
fprintf(stderr, "\n");
|
||||||
previno = 0x7fffffff;
|
previno = 0x7fffffff;
|
||||||
@ -1180,7 +1180,7 @@ accthdr(header)
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if (predict != blksread - 1)
|
if (predict != blksread - 1)
|
||||||
fprintf(stderr, "; predicted %d blocks, got %d blocks",
|
fprintf(stderr, "; predicted %ld blocks, got %ld blocks",
|
||||||
predict, blksread - 1);
|
predict, blksread - 1);
|
||||||
fprintf(stderr, "\n");
|
fprintf(stderr, "\n");
|
||||||
newcalc:
|
newcalc:
|
||||||
@ -1260,7 +1260,8 @@ findinode(header)
|
|||||||
}
|
}
|
||||||
} while (header->c_type == TS_ADDR);
|
} while (header->c_type == TS_ADDR);
|
||||||
if (skipcnt > 0)
|
if (skipcnt > 0)
|
||||||
fprintf(stderr, "resync restore, skipped %d blocks\n", skipcnt);
|
fprintf(stderr, "resync restore, skipped %ld blocks\n",
|
||||||
|
skipcnt);
|
||||||
skipcnt = 0;
|
skipcnt = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -114,7 +114,7 @@ gentempname(ep)
|
|||||||
i++;
|
i++;
|
||||||
if (np == NULL)
|
if (np == NULL)
|
||||||
badentry(ep, "not on ino list");
|
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);
|
return (name);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -333,7 +333,7 @@ badentry(ep, msg)
|
|||||||
"next hashchain name: %s\n", myname(ep->e_next));
|
"next hashchain name: %s\n", myname(ep->e_next));
|
||||||
fprintf(stderr, "entry type: %s\n",
|
fprintf(stderr, "entry type: %s\n",
|
||||||
ep->e_type == NODE ? "NODE" : "LEAF");
|
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));
|
panic("flags: %s\n", flagvalues(ep));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user