summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjulian <julian@FreeBSD.org>1996-11-13 02:01:36 +0000
committerjulian <julian@FreeBSD.org>1996-11-13 02:01:36 +0000
commitf83f1c59af25773d4d2363c8e149c409523f836e (patch)
treecb08db3e5d576100a1d902e66f1c18e0c1108700
parentf530bd2c71777c0f554b94d405627688497be35e (diff)
downloadFreeBSD-src-f83f1c59af25773d4d2363c8e149c409523f836e.zip
FreeBSD-src-f83f1c59af25773d4d2363c8e149c409523f836e.tar.gz
Submitted by: Archie@whistle.com
clear the fmod flag if it's set.
-rw-r--r--sbin/fsck/pass5.c10
-rw-r--r--sbin/fsck_ffs/pass5.c10
-rw-r--r--sbin/fsck_ifs/pass5.c10
3 files changed, 27 insertions, 3 deletions
diff --git a/sbin/fsck/pass5.c b/sbin/fsck/pass5.c
index eae5d7e..a6ed6a1 100644
--- a/sbin/fsck/pass5.c
+++ b/sbin/fsck/pass5.c
@@ -315,9 +315,17 @@ pass5()
&& dofix(&idesc[0], "FREE BLK COUNT(S) WRONG IN SUPERBLK")) {
bcopy((char *)&cstotal, (char *)&fs->fs_cstotal, sizeof *cs);
fs->fs_ronly = 0;
- fs->fs_fmod = 0;
sbdirty();
}
+ if (fs->fs_fmod != 0) {
+ pwarn("MODIFIED FLAG SET IN SUPERBLOCK");
+ if (preen)
+ printf(" (FIXED)\n");
+ if (preen || reply("FIX") == 1) {
+ fs->fs_fmod = 0;
+ sbdirty();
+ }
+ }
if (fs->fs_clean == 0) {
pwarn("CLEAN FLAG NOT SET IN SUPERBLOCK");
if (preen)
diff --git a/sbin/fsck_ffs/pass5.c b/sbin/fsck_ffs/pass5.c
index eae5d7e..a6ed6a1 100644
--- a/sbin/fsck_ffs/pass5.c
+++ b/sbin/fsck_ffs/pass5.c
@@ -315,9 +315,17 @@ pass5()
&& dofix(&idesc[0], "FREE BLK COUNT(S) WRONG IN SUPERBLK")) {
bcopy((char *)&cstotal, (char *)&fs->fs_cstotal, sizeof *cs);
fs->fs_ronly = 0;
- fs->fs_fmod = 0;
sbdirty();
}
+ if (fs->fs_fmod != 0) {
+ pwarn("MODIFIED FLAG SET IN SUPERBLOCK");
+ if (preen)
+ printf(" (FIXED)\n");
+ if (preen || reply("FIX") == 1) {
+ fs->fs_fmod = 0;
+ sbdirty();
+ }
+ }
if (fs->fs_clean == 0) {
pwarn("CLEAN FLAG NOT SET IN SUPERBLOCK");
if (preen)
diff --git a/sbin/fsck_ifs/pass5.c b/sbin/fsck_ifs/pass5.c
index eae5d7e..a6ed6a1 100644
--- a/sbin/fsck_ifs/pass5.c
+++ b/sbin/fsck_ifs/pass5.c
@@ -315,9 +315,17 @@ pass5()
&& dofix(&idesc[0], "FREE BLK COUNT(S) WRONG IN SUPERBLK")) {
bcopy((char *)&cstotal, (char *)&fs->fs_cstotal, sizeof *cs);
fs->fs_ronly = 0;
- fs->fs_fmod = 0;
sbdirty();
}
+ if (fs->fs_fmod != 0) {
+ pwarn("MODIFIED FLAG SET IN SUPERBLOCK");
+ if (preen)
+ printf(" (FIXED)\n");
+ if (preen || reply("FIX") == 1) {
+ fs->fs_fmod = 0;
+ sbdirty();
+ }
+ }
if (fs->fs_clean == 0) {
pwarn("CLEAN FLAG NOT SET IN SUPERBLOCK");
if (preen)
OpenPOWER on IntegriCloud