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
d8d07f969e
commit
85171386d8
@ -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();
|
||||
}
|
||||
|
@ -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();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -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();
|
||||
}
|
||||
|
@ -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();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -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();
|
||||
}
|
||||
|
@ -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();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user