summaryrefslogtreecommitdiffstats
path: root/sbin
diff options
context:
space:
mode:
Diffstat (limited to 'sbin')
-rw-r--r--sbin/fsck/main.c3
-rw-r--r--sbin/fsck/pass5.c9
-rw-r--r--sbin/fsck_ffs/main.c3
-rw-r--r--sbin/fsck_ffs/pass5.c9
-rw-r--r--sbin/fsck_ifs/main.c3
-rw-r--r--sbin/fsck_ifs/pass5.c9
6 files changed, 30 insertions, 6 deletions
diff --git a/sbin/fsck/main.c b/sbin/fsck/main.c
index f2dba1c..5ff6918 100644
--- a/sbin/fsck/main.c
+++ b/sbin/fsck/main.c
@@ -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();
}
diff --git a/sbin/fsck/pass5.c b/sbin/fsck/pass5.c
index 2e98f96..84e4ba7 100644
--- a/sbin/fsck/pass5.c
+++ b/sbin/fsck/pass5.c
@@ -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();
+ }
+ }
}
diff --git a/sbin/fsck_ffs/main.c b/sbin/fsck_ffs/main.c
index f2dba1c..5ff6918 100644
--- a/sbin/fsck_ffs/main.c
+++ b/sbin/fsck_ffs/main.c
@@ -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();
}
diff --git a/sbin/fsck_ffs/pass5.c b/sbin/fsck_ffs/pass5.c
index 2e98f96..84e4ba7 100644
--- a/sbin/fsck_ffs/pass5.c
+++ b/sbin/fsck_ffs/pass5.c
@@ -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();
+ }
+ }
}
diff --git a/sbin/fsck_ifs/main.c b/sbin/fsck_ifs/main.c
index f2dba1c..5ff6918 100644
--- a/sbin/fsck_ifs/main.c
+++ b/sbin/fsck_ifs/main.c
@@ -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();
}
diff --git a/sbin/fsck_ifs/pass5.c b/sbin/fsck_ifs/pass5.c
index 2e98f96..84e4ba7 100644
--- a/sbin/fsck_ifs/pass5.c
+++ b/sbin/fsck_ifs/pass5.c
@@ -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();
+ }
+ }
}
OpenPOWER on IntegriCloud