Fix some nearby type and style errors.
Pointed out by: bde
This commit is contained in:
parent
2196d98ea0
commit
a1c9ec3ce0
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=241035
@ -210,12 +210,11 @@ checkfilesys(char *filesys)
|
|||||||
struct statfs *mntp;
|
struct statfs *mntp;
|
||||||
struct stat snapdir;
|
struct stat snapdir;
|
||||||
struct group *grp;
|
struct group *grp;
|
||||||
ufs2_daddr_t blks;
|
|
||||||
struct iovec *iov;
|
struct iovec *iov;
|
||||||
char errmsg[255];
|
char errmsg[255];
|
||||||
int iovlen;
|
int iovlen;
|
||||||
int cylno;
|
int cylno;
|
||||||
ino_t files;
|
intmax_t blks, files;
|
||||||
size_t size;
|
size_t size;
|
||||||
|
|
||||||
iov = NULL;
|
iov = NULL;
|
||||||
@ -382,9 +381,9 @@ checkfilesys(char *filesys)
|
|||||||
clean:
|
clean:
|
||||||
pwarn("clean, %ld free ", (long)(sblock.fs_cstotal.cs_nffree +
|
pwarn("clean, %ld free ", (long)(sblock.fs_cstotal.cs_nffree +
|
||||||
sblock.fs_frag * sblock.fs_cstotal.cs_nbfree));
|
sblock.fs_frag * sblock.fs_cstotal.cs_nbfree));
|
||||||
printf("(%lld frags, %lld blocks, %.1f%% fragmentation)\n",
|
printf("(%jd frags, %jd blocks, %.1f%% fragmentation)\n",
|
||||||
(long long)sblock.fs_cstotal.cs_nffree,
|
(intmax_t)sblock.fs_cstotal.cs_nffree,
|
||||||
(long long)sblock.fs_cstotal.cs_nbfree,
|
(intmax_t)sblock.fs_cstotal.cs_nbfree,
|
||||||
sblock.fs_cstotal.cs_nffree * 100.0 / sblock.fs_dsize);
|
sblock.fs_cstotal.cs_nffree * 100.0 / sblock.fs_dsize);
|
||||||
return (0);
|
return (0);
|
||||||
}
|
}
|
||||||
@ -481,8 +480,8 @@ checkfilesys(char *filesys)
|
|||||||
blks = maxfsblock - (n_ffree + sblock.fs_frag * n_bfree) - blks;
|
blks = maxfsblock - (n_ffree + sblock.fs_frag * n_bfree) - blks;
|
||||||
if (bkgrdflag && (files > 0 || blks > 0)) {
|
if (bkgrdflag && (files > 0 || blks > 0)) {
|
||||||
countdirs = sblock.fs_cstotal.cs_ndir - countdirs;
|
countdirs = sblock.fs_cstotal.cs_ndir - countdirs;
|
||||||
pwarn("Reclaimed: %ld directories, %ld files, %lld fragments\n",
|
pwarn("Reclaimed: %ld directories, %jd files, %jd fragments\n",
|
||||||
countdirs, (long)files - countdirs, (long long)blks);
|
countdirs, files - countdirs, blks);
|
||||||
}
|
}
|
||||||
pwarn("%ld files, %jd used, %ju free ",
|
pwarn("%ld files, %jd used, %ju free ",
|
||||||
(long)n_files, (intmax_t)n_blks,
|
(long)n_files, (intmax_t)n_blks,
|
||||||
@ -492,13 +491,13 @@ checkfilesys(char *filesys)
|
|||||||
n_ffree * 100.0 / sblock.fs_dsize);
|
n_ffree * 100.0 / sblock.fs_dsize);
|
||||||
if (debug) {
|
if (debug) {
|
||||||
if (files < 0)
|
if (files < 0)
|
||||||
printf("%jd inodes missing\n", (intmax_t)-files);
|
printf("%jd inodes missing\n", -files);
|
||||||
if (blks < 0)
|
if (blks < 0)
|
||||||
printf("%lld blocks missing\n", -(long long)blks);
|
printf("%jd blocks missing\n", -blks);
|
||||||
if (duplist != NULL) {
|
if (duplist != NULL) {
|
||||||
printf("The following duplicate blocks remain:");
|
printf("The following duplicate blocks remain:");
|
||||||
for (dp = duplist; dp; dp = dp->next)
|
for (dp = duplist; dp; dp = dp->next)
|
||||||
printf(" %lld,", (long long)dp->dup);
|
printf(" %jd,", (intmax_t)dp->dup);
|
||||||
printf("\n");
|
printf("\n");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -99,11 +99,10 @@ pass1(void)
|
|||||||
if (!rebuildcg && sblock.fs_magic == FS_UFS2_MAGIC) {
|
if (!rebuildcg && sblock.fs_magic == FS_UFS2_MAGIC) {
|
||||||
inosused = cgrp.cg_initediblk;
|
inosused = cgrp.cg_initediblk;
|
||||||
if (inosused > sblock.fs_ipg) {
|
if (inosused > sblock.fs_ipg) {
|
||||||
pfatal("%s (%ju > %d) %s %d\nReset to %d\n",
|
pfatal(
|
||||||
"Too many initialized inodes",
|
"Too many initialized inodes (%ju > %d) in cylinder group %d\nReset to %d\n",
|
||||||
(uintmax_t)inosused,
|
(uintmax_t)inosused,
|
||||||
sblock.fs_ipg, "in cylinder group", c,
|
sblock.fs_ipg, c, sblock.fs_ipg);
|
||||||
sblock.fs_ipg);
|
|
||||||
inosused = sblock.fs_ipg;
|
inosused = sblock.fs_ipg;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
@ -1401,9 +1401,8 @@ ino_adjust(struct suj_ino *sino)
|
|||||||
ip = ino_read(ino);
|
ip = ino_read(ino);
|
||||||
mode = DIP(ip, di_mode) & IFMT;
|
mode = DIP(ip, di_mode) & IFMT;
|
||||||
if (nlink > LINK_MAX)
|
if (nlink > LINK_MAX)
|
||||||
err_suj("ino %ju %s, new link %d, old link %d\n",
|
err_suj("ino %ju nlink manipulation error, new %d, old %d\n",
|
||||||
(uintmax_t)ino, "nlink manipulation error", nlink,
|
(uintmax_t)ino, nlink, DIP(ip, di_nlink));
|
||||||
DIP(ip, di_nlink));
|
|
||||||
if (debug)
|
if (debug)
|
||||||
printf("Adjusting ino %ju, nlink %d, old link %d lastmode %o\n",
|
printf("Adjusting ino %ju, nlink %d, old link %d lastmode %o\n",
|
||||||
(uintmax_t)ino, nlink, DIP(ip, di_nlink), sino->si_mode);
|
(uintmax_t)ino, nlink, DIP(ip, di_nlink), sino->si_mode);
|
||||||
|
Loading…
Reference in New Issue
Block a user