Message ID | 20210204233601.2369470-2-harshads@google.com |
---|---|
State | Rejected |
Headers | show |
Series | [1/3] ext2fs: initialize handle to NULL in ext2fs_count_blks | expand |
On Thu, Feb 04, 2021 at 03:36:00PM -0800, Harshad Shirwadkar wrote: > From: Harshad Shirwadkar <harshadshirwadkar@gmail.com> > > 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@gmail.com> It looks like this change is already in commit 63b7192cae60 ("e2fsck: add fc replay for link, unlink, creat tags") which is already in the upstream repo? - Ted
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;