summaryrefslogtreecommitdiff
path: root/e2fsck/journal.c
diff options
context:
space:
mode:
authorTheodore Ts'o <tytso@mit.edu>2017-02-16 22:02:35 -0500
committerTheodore Ts'o <tytso@mit.edu>2017-02-16 22:02:35 -0500
commitbf9f3b6d5b10d19218b4ed904c12b22e36ec57dd (patch)
tree06b3cb37bf2a064dfb5cf0a790572495b1fbd049 /e2fsck/journal.c
parent03a179a10ef44c7057d5aad3d6654ee6b507f2ed (diff)
downloade2fsprogs-bf9f3b6d5b10d19218b4ed904c12b22e36ec57dd.tar.gz
e2fsck: exit with exit status 0 if no errors were fixed
Previously, e2fsck would exit with a status code of 1 even though the only changes that it made to the file system were various optimziations and not fixing file system corruption. Since the man page states that an exit status of 1 means "file system errors corrupted", fix e2fsck to return an exit status of 0. Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Diffstat (limited to 'e2fsck/journal.c')
-rw-r--r--e2fsck/journal.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/e2fsck/journal.c b/e2fsck/journal.c
index 46fe7b4c..c4f58f1b 100644
--- a/e2fsck/journal.c
+++ b/e2fsck/journal.c
@@ -572,6 +572,7 @@ static void clear_v2_journal_fields(journal_t *journal)
if (!fix_problem(ctx, PR_0_CLEAR_V2_JOURNAL, &pctx))
return;
+ ctx->flags |= E2F_FLAG_PROBLEMS_FIXED;
memset(((char *) journal->j_superblock) + V1_SB_SIZE, 0,
ctx->fs->blocksize-V1_SB_SIZE);
mark_buffer_dirty(journal->j_sb_buffer);