Skip to contentSkip to conversation

btrfs-progs: fix stray error message in check

PATCH Applied [email protected] 2 participants 2 messages Jan 11, 2019 – Jan 15, 2019 Btrfs file system

lore
Share & tools
lore
#0 lore raw

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"

---
 check/main.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
check/main.c +2 -1
index db18827b..44bfac4e 100644
@@ -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
Applied
#1 lore raw
Quoted 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"

Applied, thanks.