summaryrefslogtreecommitdiff
path: root/qgroup.c
diff options
context:
space:
mode:
Diffstat (limited to 'qgroup.c')
-rw-r--r--qgroup.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/qgroup.c b/qgroup.c
index 2cfd6dbd..a035579e 100644
--- a/qgroup.c
+++ b/qgroup.c
@@ -610,8 +610,9 @@ static struct btrfs_qgroup *get_or_add_qgroup(
ret = qgroup_tree_insert(qgroup_lookup, bq);
if (ret) {
- error("failed to insert %llu into tree: %s",
- (unsigned long long)bq->qgroupid, strerror(-ret));
+ errno = -ret;
+ error("failed to insert %llu into tree: %m",
+ (unsigned long long)bq->qgroupid);
free(bq);
return ERR_PTR(ret);
}