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:
dg 1994-08-21 08:47:10 +00:00
parent d8d07f969e
commit 85171386d8
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();
}
}
}