summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sbin/tunefs/tunefs.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/sbin/tunefs/tunefs.c b/sbin/tunefs/tunefs.c
index 1fda3f7..e694e2f 100644
--- a/sbin/tunefs/tunefs.c
+++ b/sbin/tunefs/tunefs.c
@@ -285,8 +285,11 @@ again:
if (nflag) {
name = "soft updates";
if (strcmp(nvalue, "enable") == 0) {
- if ( sblock.fs_flags & FS_DOSOFTDEP ) {
+ if (sblock.fs_flags & FS_DOSOFTDEP) {
warnx("%s remains unchanged as enabled", name);
+ } else if (sblock.fs_clean == 0) {
+ warnx("%s cannot be enabled until fsck is run",
+ name);
} else {
sblock.fs_flags |= FS_DOSOFTDEP;
warnx("%s set", name);
OpenPOWER on IntegriCloud