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

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