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:
David Greenman 1994-08-21 08:47:10 +00:00
parent 6b4c995bf9
commit 802cd8e6f0
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=2179
6 changed files with 30 additions and 6 deletions

View File

@ -285,8 +285,7 @@ checkfilesys(filesys, mntpt, auxdata, child)
duplist = (struct dups *)0;
muldup = (struct dups *)0;
inocleanup();
if (fsmodified || (!sblock.fs_clean && preen && !nflag && !hotroot)) {
sblock.fs_clean = 1;
if (fsmodified) {
(void)time(&sblock.fs_time);
sbdirty();
}

View File

@ -316,4 +316,13 @@ pass5()
fs->fs_fmod = 0;
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();
}
}
}

View File

@ -285,8 +285,7 @@ checkfilesys(filesys, mntpt, auxdata, child)
duplist = (struct dups *)0;
muldup = (struct dups *)0;
inocleanup();
if (fsmodified || (!sblock.fs_clean && preen && !nflag && !hotroot)) {
sblock.fs_clean = 1;
if (fsmodified) {
(void)time(&sblock.fs_time);
sbdirty();
}

View File

@ -316,4 +316,13 @@ pass5()
fs->fs_fmod = 0;
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();
}
}
}

View File

@ -285,8 +285,7 @@ checkfilesys(filesys, mntpt, auxdata, child)
duplist = (struct dups *)0;
muldup = (struct dups *)0;
inocleanup();
if (fsmodified || (!sblock.fs_clean && preen && !nflag && !hotroot)) {
sblock.fs_clean = 1;
if (fsmodified) {
(void)time(&sblock.fs_time);
sbdirty();
}

View File

@ -316,4 +316,13 @@ pass5()
fs->fs_fmod = 0;
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();
}
}
}