btrfs-progs: fix stray error message in check
PATCH 1/1 btrfs-progs: fix stray error message in check
From: Jeff Mahoney <[email protected]>
Commit e578b59bf61 (btrfs-progs: convert strerror to implicit %m) missed adding braces after a conditional so we will see the following message whenever a tree block needs repair, regardless of whether repair was
successful: "Failed to repair btree: Success"
Signed-off-by Jeff Mahoney <[email protected]>
--- check/main.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
check/main.c +2 -1
@@ -3362,9 +3362,10 @@ skip_walking:printf ("Try to repair the btree for root %llu\n" , root->root_key.objectid); ret =repair_btree (root, &corrupt_blocks); -if (ret <0 ) +if (ret <0 ) { errno = -ret;fprintf (stderr,"Failed to repair btree: %m\n" ); + }if (!ret)printf ("Btree for root %llu is fixed\n" , root->root_key.objectid);
Signature · 1 line
2.16.4
David Sterba
AppliedQuoted 8 lines · On Fri, Jan 11, 2019 at 05:07:49PM -0500, [email protected] wrote:
From: Jeff Mahoney <[email protected]>
Commit
e578b59bf61(btrfs-progs: convert strerror to implicit %m) missed adding braces after a conditional so we will see the following message whenever a tree block needs repair, regardless of whether repair was
successful: "Failed to repair btree: Success"Signed-off-by Jeff Mahoney <[email protected]>
Applied, thanks.