]> git.ipfire.org Git - thirdparty/e2fsprogs.git/commitdiff
e2fsck: warn if checkinterval and broken_system_clock both set
authorEric Sandeen <sandeen@redhat.com>
Mon, 9 Apr 2018 19:28:12 +0000 (15:28 -0400)
committerTheodore Ts'o <tytso@mit.edu>
Mon, 9 Apr 2018 20:20:53 +0000 (16:20 -0400)
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 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@redhat.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Reviewed-by: Lukas Czerner <lczerner@redhat.com>
e2fsck/unix.c

index faf5af9a82242513cedce89f1fe7324cbf451fc0..cbe5ec5034cbbd2d0141fdd1d40a3b1421a8dbc9 100644 (file)
@@ -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);