btrfs-progs: fix stray error message in check

Commit e578b59bf6 ("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 <jeffm@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
master
Jeff Mahoney 2019-01-11 17:07:49 -05:00 committed by David Sterba
parent aca8193adb
commit 8bda5132d8
1 changed files with 2 additions and 1 deletions

View File

@ -3473,9 +3473,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);