[PATCH] e2fsck: warn if checkinterval and broken_system_clock both set

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



If broken_system_clock is set in e2fsck.conf and this causes
the check interval to be ignored, make that clear to the user:

# e2fsck /dev/sda1 
e2fsck 1.44.1 (24-Mar-2018)
/dev/sda1: ignoring check interval, broken_system_clock set
/dev/sda1: clean, 11/65536 files, 12955/262144 blocks

Signed-off-by: Eric Sandeen <sandeen@xxxxxxxxxx>
---

(I wasn't sure, maybe this test should go outside all the reason-
setting, since this is a not-checking case?  But in the end it seemed
to make most sense along with all the other tests for these states.)

diff --git a/e2fsck/unix.c b/e2fsck/unix.c
index faf5af9..3a76be1 100644
--- a/e2fsck/unix.c
+++ b/e2fsck/unix.c
@@ -396,7 +396,12 @@ static void check_if_skip(e2fsck_t ctx)
 		if (batt && ((ctx->now - fs->super->s_lastcheck) <
 			     fs->super->s_checkinterval*2))
 			reason = 0;
+	} else if (broken_system_clock && fs->super->s_checkinterval) {
+		log_out(ctx, "%s: ", ctx->device_name);
+		log_out(ctx, "%s",
+			_("ignoring check interval, broken_system_clock set\n"));
 	}
+
 	if (reason) {
 		log_out(ctx, "%s", ctx->device_name);
 		log_out(ctx, reason, reason_arg);




[Index of Archives]     [Reiser Filesystem Development]     [Ceph FS]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux FS]     [Yosemite National Park]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Device Mapper]     [Linux Media]

  Powered by Linux