From: Harshad Shirwadkar <harshadshirwadkar@xxxxxxxxx> We print the error message corresponding to errcode while converting errcode to errno. Don't do that if errcode is 0. Signed-off-by: Harshad Shirwadkar <harshadshirwadkar@xxxxxxxxx> --- e2fsck/journal.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/e2fsck/journal.c b/e2fsck/journal.c index b1ca485c..922c252d 100644 --- a/e2fsck/journal.c +++ b/e2fsck/journal.c @@ -383,7 +383,9 @@ out_err: static int __errcode_to_errno(errcode_t err, const char *func, int line) { - fprintf(stderr, "Error \"%s\" encountered in %s at line %d\n", + if (err == 0) + return 0; + fprintf(stderr, "Error \"%s\" encountered in function %s at line %d\n", error_message(err), func, line); if (err <= 256) return -err; -- 2.30.0.365.g02bc693789-goog