mirror of
https://git.hardenedbsd.org/hardenedbsd/HardenedBSD.git
synced 2025-01-10 08:22:27 +01:00
Fixed printf format errors.
This commit is contained in:
parent
ce79296f87
commit
ca46ad5f48
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=37239
@ -400,12 +400,12 @@ mkfs(pp, fsys, fi, fo)
|
||||
/ MAXIPG(&sblock) + 1));
|
||||
} else if (!mapcramped) {
|
||||
printf("With %d bytes per inode, ", density);
|
||||
printf("minimum cylinders per group is %d\n", mincpg);
|
||||
printf("minimum cylinders per group is %ld\n", mincpg);
|
||||
}
|
||||
}
|
||||
if (mapcramped) {
|
||||
printf("With %d sectors per cylinder, ", sblock.fs_spc);
|
||||
printf("minimum cylinders per group is %d\n", mincpg);
|
||||
printf("minimum cylinders per group is %ld\n", mincpg);
|
||||
}
|
||||
if (inodecramped || mapcramped) {
|
||||
if (sblock.fs_bsize != bsize)
|
||||
@ -423,7 +423,7 @@ mkfs(pp, fsys, fi, fo)
|
||||
*/
|
||||
sblock.fs_cpg = cpg;
|
||||
if (sblock.fs_cpg % mincpc != 0) {
|
||||
printf("%s groups must have a multiple of %d cylinders\n",
|
||||
printf("%s groups must have a multiple of %ld cylinders\n",
|
||||
cpgflg ? "Cylinder" : "Warning: cylinder", mincpc);
|
||||
sblock.fs_cpg = roundup(sblock.fs_cpg, mincpc);
|
||||
if (!cpgflg)
|
||||
@ -448,11 +448,11 @@ mkfs(pp, fsys, fi, fo)
|
||||
}
|
||||
sblock.fs_fpg = (sblock.fs_cpg * sblock.fs_spc) / NSPF(&sblock);
|
||||
if ((sblock.fs_cpg * sblock.fs_spc) % NSPB(&sblock) != 0) {
|
||||
printf("panic (fs_cpg * fs_spc) % NSPF != 0");
|
||||
printf("panic (fs_cpg * fs_spc) %% NSPF != 0");
|
||||
exit(24);
|
||||
}
|
||||
if (sblock.fs_cpg < mincpg) {
|
||||
printf("cylinder groups must have at least %d cylinders\n",
|
||||
printf("cylinder groups must have at least %ld cylinders\n",
|
||||
mincpg);
|
||||
exit(25);
|
||||
} else if (sblock.fs_cpg != cpg) {
|
||||
@ -564,9 +564,9 @@ next:
|
||||
sblock.fs_dblkno = sblock.fs_iblkno + sblock.fs_ipg / INOPF(&sblock);
|
||||
i = MIN(~sblock.fs_cgmask, sblock.fs_ncg - 1);
|
||||
if (cgdmin(&sblock, i) - cgbase(&sblock, i) >= sblock.fs_fpg) {
|
||||
printf("inode blocks/cyl group (%d) >= data blocks (%d)\n",
|
||||
printf("inode blocks/cyl group (%ld) >= data blocks (%ld)\n",
|
||||
cgdmin(&sblock, i) - cgbase(&sblock, i) / sblock.fs_frag,
|
||||
sblock.fs_fpg / sblock.fs_frag);
|
||||
(long)(sblock.fs_fpg / sblock.fs_frag));
|
||||
printf("number of cylinders per cylinder group (%d) %s.\n",
|
||||
sblock.fs_cpg, "must be increased");
|
||||
exit(29);
|
||||
@ -580,10 +580,12 @@ next:
|
||||
(cgdmin(&sblock, 0) + 3 * sblock.fs_frag));
|
||||
exit(30);
|
||||
}
|
||||
printf("Warning: inode blocks/cyl group (%d) >= data blocks (%d) in last\n",
|
||||
printf(
|
||||
"Warning: inode blocks/cyl group (%ld) >= data blocks (%ld) in last\n",
|
||||
(cgdmin(&sblock, j) - cgbase(&sblock, j)) / sblock.fs_frag,
|
||||
i / sblock.fs_frag);
|
||||
printf(" cylinder group. This implies %d sector(s) cannot be allocated.\n",
|
||||
printf(
|
||||
" cylinder group. This implies %ld sector(s) cannot be allocated.\n",
|
||||
i * NSPF(&sblock));
|
||||
sblock.fs_ncg--;
|
||||
sblock.fs_ncyl -= sblock.fs_ncyl % sblock.fs_cpg;
|
||||
@ -659,9 +661,9 @@ next:
|
||||
initcg(cylno, utime);
|
||||
if (mfs)
|
||||
continue;
|
||||
j = sprintf(tmpbuf, " %d,",
|
||||
fsbtodb(&sblock, cgsblock(&sblock, cylno)));
|
||||
if (i+j >= width) {
|
||||
j = sprintf(tmpbuf, " %ld,",
|
||||
fsbtodb(&sblock, cgsblock(&sblock, cylno)));
|
||||
if (i + j >= width) {
|
||||
printf("\n");
|
||||
i = 0;
|
||||
}
|
||||
@ -1254,13 +1256,13 @@ rdfs(bno, size, bf)
|
||||
return;
|
||||
}
|
||||
if (lseek(fsi, (off_t)bno * sectorsize, 0) < 0) {
|
||||
printf("seek error: %ld\n", bno);
|
||||
printf("seek error: %ld\n", (long)bno);
|
||||
perror("rdfs");
|
||||
exit(33);
|
||||
}
|
||||
n = read(fsi, bf, size);
|
||||
if (n != size) {
|
||||
printf("read error: %ld\n", bno);
|
||||
printf("read error: %ld\n", (long)bno);
|
||||
perror("rdfs");
|
||||
exit(34);
|
||||
}
|
||||
@ -1283,13 +1285,13 @@ wtfs(bno, size, bf)
|
||||
if (Nflag)
|
||||
return;
|
||||
if (lseek(fso, (off_t)bno * sectorsize, SEEK_SET) < 0) {
|
||||
printf("seek error: %ld\n", bno);
|
||||
printf("seek error: %ld\n", (long)bno);
|
||||
perror("wtfs");
|
||||
exit(35);
|
||||
}
|
||||
n = write(fso, bf, size);
|
||||
if (n != size) {
|
||||
printf("write error: %ld\n", bno);
|
||||
printf("write error: %ld\n", (long)bno);
|
||||
perror("wtfs");
|
||||
exit(36);
|
||||
}
|
||||
|
@ -541,7 +541,7 @@ havelabel:
|
||||
if (t_or_u_flag && secpercyl != lp->d_secpercyl)
|
||||
fprintf(stderr, "%s (%d) %s (%lu)\n",
|
||||
"Warning: calculated sectors per cylinder", secpercyl,
|
||||
"disagrees with disk label", lp->d_secpercyl);
|
||||
"disagrees with disk label", (u_long)lp->d_secpercyl);
|
||||
if (maxbpg == 0)
|
||||
maxbpg = MAXBLKPG(bsize);
|
||||
headswitch = lp->d_headswitch;
|
||||
|
@ -33,7 +33,7 @@
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* $Id: quotacheck.c,v 1.7 1997/06/16 06:38:14 charnier Exp $
|
||||
* $Id: quotacheck.c,v 1.8 1997/06/30 11:08:29 charnier Exp $
|
||||
*/
|
||||
|
||||
#ifndef lint
|
||||
@ -361,11 +361,13 @@ update(fsname, quotafile, type)
|
||||
printf("%s: ", fsname);
|
||||
printf("%-8s fixed:", fup->fu_name);
|
||||
if (dqbuf.dqb_curinodes != fup->fu_curinodes)
|
||||
(void)printf("\tinodes %ld -> %ld",
|
||||
dqbuf.dqb_curinodes, fup->fu_curinodes);
|
||||
(void)printf("\tinodes %lu -> %lu",
|
||||
(u_long)dqbuf.dqb_curinodes,
|
||||
(u_long)fup->fu_curinodes);
|
||||
if (dqbuf.dqb_curblocks != fup->fu_curblocks)
|
||||
(void)printf("\tblocks %ld -> %ld",
|
||||
dqbuf.dqb_curblocks, fup->fu_curblocks);
|
||||
(void)printf("\tblocks %lu -> %lu",
|
||||
(u_long)dqbuf.dqb_curblocks,
|
||||
(u_long)fup->fu_curblocks);
|
||||
(void)printf("\n");
|
||||
}
|
||||
/*
|
||||
@ -613,5 +615,5 @@ bread(bno, buf, cnt)
|
||||
|
||||
if (lseek(fi, (off_t)bno * dev_bsize, SEEK_SET) < 0 ||
|
||||
read(fi, buf, cnt) != cnt)
|
||||
errx(1, "block %ld", bno);
|
||||
errx(1, "block %ld", (long)bno);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user