Blame SOURCES/e2fsprogs-1.44.1-e2fsck-warn-if-checkinterval-and-broken_system_clock.patch

98901c
From 90f0190ac3d2f77a420aaf6ad78b0fb9b93f4698 Mon Sep 17 00:00:00 2001
98901c
From: Eric Sandeen <sandeen@redhat.com>
98901c
Date: Mon, 9 Apr 2018 15:28:12 -0400
98901c
Subject: [PATCH] e2fsck: warn if checkinterval and broken_system_clock both
98901c
 set
98901c
98901c
If broken_system_clock is set in e2fsck.conf and this causes
98901c
the check interval to be ignored, make that clear to the user:
98901c
98901c
e2fsck 1.44.1 (24-Mar-2018)
98901c
/dev/sda1: ignoring check interval, broken_system_clock set
98901c
/dev/sda1: clean, 11/65536 files, 12955/262144 blocks
98901c
98901c
Signed-off-by: Eric Sandeen <sandeen@redhat.com>
98901c
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
98901c
Reviewed-by: Lukas Czerner <lczerner@redhat.com>
98901c
---
98901c
 e2fsck/unix.c | 5 +++++
98901c
 1 file changed, 5 insertions(+)
98901c
98901c
diff --git a/e2fsck/unix.c b/e2fsck/unix.c
98901c
index 6f94644..d94d5dc 100644
98901c
--- a/e2fsck/unix.c
98901c
+++ b/e2fsck/unix.c
98901c
@@ -384,7 +384,12 @@ static void check_if_skip(e2fsck_t ctx)
98901c
 		if (batt && ((ctx->now - fs->super->s_lastcheck) <
98901c
 			     fs->super->s_checkinterval*2))
98901c
 			reason = 0;
98901c
+	} else if (broken_system_clock && fs->super->s_checkinterval) {
98901c
+		log_out(ctx, "%s: ", ctx->device_name);
98901c
+		log_out(ctx, "%s",
98901c
+			_("ignoring check interval, broken_system_clock set\n"));
98901c
 	}
98901c
+
98901c
 	if (reason) {
98901c
 		log_out(ctx, "%s", ctx->device_name);
98901c
 		log_out(ctx, reason, reason_arg);
98901c
-- 
98901c
2.17.1
98901c