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

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