Better support for clean bit: prompt the user to fix it if it's wrong
when not preening, and indicate if it was fixed when preening.
This commit is contained in:
parent
6b4c995bf9
commit
802cd8e6f0
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=2179
@ -285,8 +285,7 @@ checkfilesys(filesys, mntpt, auxdata, child)
|
|||||||
duplist = (struct dups *)0;
|
duplist = (struct dups *)0;
|
||||||
muldup = (struct dups *)0;
|
muldup = (struct dups *)0;
|
||||||
inocleanup();
|
inocleanup();
|
||||||
if (fsmodified || (!sblock.fs_clean && preen && !nflag && !hotroot)) {
|
if (fsmodified) {
|
||||||
sblock.fs_clean = 1;
|
|
||||||
(void)time(&sblock.fs_time);
|
(void)time(&sblock.fs_time);
|
||||||
sbdirty();
|
sbdirty();
|
||||||
}
|
}
|
||||||
|
@ -316,4 +316,13 @@ pass5()
|
|||||||
fs->fs_fmod = 0;
|
fs->fs_fmod = 0;
|
||||||
sbdirty();
|
sbdirty();
|
||||||
}
|
}
|
||||||
|
if (fs->fs_clean == 0) {
|
||||||
|
pwarn("CLEAN FLAG IS WRONG IN SUPERBLOCK");
|
||||||
|
if (preen)
|
||||||
|
printf(" (FIXED)\n");
|
||||||
|
if (preen || reply("FIX") == 1) {
|
||||||
|
fs->fs_clean = 1;
|
||||||
|
sbdirty();
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -285,8 +285,7 @@ checkfilesys(filesys, mntpt, auxdata, child)
|
|||||||
duplist = (struct dups *)0;
|
duplist = (struct dups *)0;
|
||||||
muldup = (struct dups *)0;
|
muldup = (struct dups *)0;
|
||||||
inocleanup();
|
inocleanup();
|
||||||
if (fsmodified || (!sblock.fs_clean && preen && !nflag && !hotroot)) {
|
if (fsmodified) {
|
||||||
sblock.fs_clean = 1;
|
|
||||||
(void)time(&sblock.fs_time);
|
(void)time(&sblock.fs_time);
|
||||||
sbdirty();
|
sbdirty();
|
||||||
}
|
}
|
||||||
|
@ -316,4 +316,13 @@ pass5()
|
|||||||
fs->fs_fmod = 0;
|
fs->fs_fmod = 0;
|
||||||
sbdirty();
|
sbdirty();
|
||||||
}
|
}
|
||||||
|
if (fs->fs_clean == 0) {
|
||||||
|
pwarn("CLEAN FLAG IS WRONG IN SUPERBLOCK");
|
||||||
|
if (preen)
|
||||||
|
printf(" (FIXED)\n");
|
||||||
|
if (preen || reply("FIX") == 1) {
|
||||||
|
fs->fs_clean = 1;
|
||||||
|
sbdirty();
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -285,8 +285,7 @@ checkfilesys(filesys, mntpt, auxdata, child)
|
|||||||
duplist = (struct dups *)0;
|
duplist = (struct dups *)0;
|
||||||
muldup = (struct dups *)0;
|
muldup = (struct dups *)0;
|
||||||
inocleanup();
|
inocleanup();
|
||||||
if (fsmodified || (!sblock.fs_clean && preen && !nflag && !hotroot)) {
|
if (fsmodified) {
|
||||||
sblock.fs_clean = 1;
|
|
||||||
(void)time(&sblock.fs_time);
|
(void)time(&sblock.fs_time);
|
||||||
sbdirty();
|
sbdirty();
|
||||||
}
|
}
|
||||||
|
@ -316,4 +316,13 @@ pass5()
|
|||||||
fs->fs_fmod = 0;
|
fs->fs_fmod = 0;
|
||||||
sbdirty();
|
sbdirty();
|
||||||
}
|
}
|
||||||
|
if (fs->fs_clean == 0) {
|
||||||
|
pwarn("CLEAN FLAG IS WRONG IN SUPERBLOCK");
|
||||||
|
if (preen)
|
||||||
|
printf(" (FIXED)\n");
|
||||||
|
if (preen || reply("FIX") == 1) {
|
||||||
|
fs->fs_clean = 1;
|
||||||
|
sbdirty();
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user