summaryrefslogtreecommitdiff
path: root/btrfs-find-root.c
diff options
context:
space:
mode:
Diffstat (limited to 'btrfs-find-root.c')
-rw-r--r--btrfs-find-root.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/btrfs-find-root.c b/btrfs-find-root.c
index e2d2e70c..4419873a 100644
--- a/btrfs-find-root.c
+++ b/btrfs-find-root.c
@@ -204,8 +204,8 @@ int main(int argc, char **argv)
&filter.match_gen, &filter.match_level);
ret = btrfs_find_root_search(fs_info, &filter, &result, &found);
if (ret < 0) {
- fprintf(stderr, "Fail to search the tree root: %s\n",
- strerror(-ret));
+ errno = -ret;
+ fprintf(stderr, "Fail to search the tree root: %m\n");
goto out;
}
if (ret > 0) {