* [PATCH] btrfs-progs: fix stray error message in check
@ 2019-01-11 22:07 jeffm
2019-01-15 17:39 ` David Sterba
0 siblings, 1 reply; 2+ messages in thread
From: jeffm @ 2019-01-11 22:07 UTC (permalink / raw)
To: linux-btrfs; +Cc: Jeff Mahoney
From: Jeff Mahoney <jeffm@suse.com>
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 <jeffm@suse.com>
---
check/main.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/check/main.c b/check/main.c
index db18827b..44bfac4e 100644
--- a/check/main.c
+++ b/check/main.c
@@ -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);
--
2.16.4
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] btrfs-progs: fix stray error message in check
2019-01-11 22:07 [PATCH] btrfs-progs: fix stray error message in check jeffm
@ 2019-01-15 17:39 ` David Sterba
0 siblings, 0 replies; 2+ messages in thread
From: David Sterba @ 2019-01-15 17:39 UTC (permalink / raw)
To: jeffm; +Cc: linux-btrfs
On Fri, Jan 11, 2019 at 05:07:49PM -0500, jeffm@suse.com wrote:
> From: Jeff Mahoney <jeffm@suse.com>
>
> 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 <jeffm@suse.com>
Applied, thanks.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-01-15 17:40 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-01-11 22:07 [PATCH] btrfs-progs: fix stray error message in check jeffm
2019-01-15 17:39 ` David Sterba
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).