summaryrefslogtreecommitdiff
path: root/check/mode-common.c
diff options
context:
space:
mode:
Diffstat (limited to 'check/mode-common.c')
-rw-r--r--check/mode-common.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/check/mode-common.c b/check/mode-common.c
index 15e2bbd1..2efa4dc5 100644
--- a/check/mode-common.c
+++ b/check/mode-common.c
@@ -450,7 +450,8 @@ int link_inode_to_lostfound(struct btrfs_trans_handle *trans,
BTRFS_FIRST_FREE_OBJECTID, &lost_found_ino,
mode);
if (ret < 0) {
- error("failed to create '%s' dir: %s", dir_name, strerror(-ret));
+ errno = -ret;
+ error("failed to create '%s' dir: %m", dir_name);
goto out;
}
ret = btrfs_add_link(trans, root, ino, lost_found_ino,
@@ -474,8 +475,9 @@ int link_inode_to_lostfound(struct btrfs_trans_handle *trans,
name_len, filetype, NULL, 1, 0);
}
if (ret < 0) {
- error("failed to link the inode %llu to %s dir: %s",
- ino, dir_name, strerror(-ret));
+ errno = -ret;
+ error("failed to link the inode %llu to %s dir: %m",
+ ino, dir_name);
goto out;
}
@@ -491,7 +493,7 @@ out:
}
/*
- * Extra (optional) check for dev_item size to report possbile problem on a new
+ * Extra (optional) check for dev_item size to report possible problem on a new
* kernel.
*/
void check_dev_size_alignment(u64 devid, u64 total_bytes, u32 sectorsize)