summaryrefslogtreecommitdiff
path: root/btrfs-list.c
diff options
context:
space:
mode:
Diffstat (limited to 'btrfs-list.c')
-rw-r--r--btrfs-list.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/btrfs-list.c b/btrfs-list.c
index 90c98be1..adda45ab 100644
--- a/btrfs-list.c
+++ b/btrfs-list.c
@@ -515,8 +515,9 @@ static int add_root(struct root_lookup *root_lookup,
ret = root_tree_insert(root_lookup, ri);
if (ret < 0) {
- error("failed to insert subvolume %llu to tree: %s",
- (unsigned long long)root_id, strerror(-ret));
+ errno = -ret;
+ error("failed to insert subvolume %llu to tree: %m",
+ (unsigned long long)root_id);
exit(1);
}
return 0;