From d7fdc2b61e57985a4611ec3a591c002427e093d9 Mon Sep 17 00:00:00 2001 From: Kent Overstreet Date: Thu, 3 Dec 2020 19:15:37 -0500 Subject: [PATCH] Ensure we always print a message if fsck doesnt't return 0 --- cmd_fsck.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/cmd_fsck.c b/cmd_fsck.c index 9ef69ad8..247e2072 100644 --- a/cmd_fsck.c +++ b/cmd_fsck.c @@ -93,10 +93,14 @@ int cmd_fsck(int argc, char *argv[]) exit(8); } - if (test_bit(BCH_FS_ERRORS_FIXED, &c->flags)) + if (test_bit(BCH_FS_ERRORS_FIXED, &c->flags)) { + fprintf(stderr, "%s: errors fixed\n", c->name); ret |= 1; - if (test_bit(BCH_FS_ERROR, &c->flags)) + } + if (test_bit(BCH_FS_ERROR, &c->flags)) { + fprintf(stderr, "%s: still has errors\n", c->name); ret |= 4; + } bch2_fs_stop(c); return ret;