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

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