summaryrefslogtreecommitdiff
path: root/cmd_dump.c
diff options
context:
space:
mode:
authorKent Overstreet <kent.overstreet@linux.dev>2022-12-19 16:05:54 -0500
committerKent Overstreet <kent.overstreet@linux.dev>2022-12-19 16:05:54 -0500
commit1eae1d718c228fb1fc3e7a47a830a2c71f84b5cf (patch)
treeda47d7b5b6591ca45951eb63bdee21a313ce8aec /cmd_dump.c
parente2670a38d1ad6038d64687cb1d585349508e06d7 (diff)
Use bch2_err_str() instead of strerror()
This correctly prints out our private error codes. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'cmd_dump.c')
-rw-r--r--cmd_dump.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/cmd_dump.c b/cmd_dump.c
index 4e3d721..76b44c5 100644
--- a/cmd_dump.c
+++ b/cmd_dump.c
@@ -82,7 +82,7 @@ static void dump_one_device(struct bch_fs *c, struct bch_dev *ca, int fd,
}
if (ret)
- die("error %s walking btree nodes", strerror(-ret));
+ die("error %s walking btree nodes", bch2_err_str(ret));
b = c->btree_roots[i].b;
if (!btree_node_fake(b)) {
@@ -147,7 +147,7 @@ int cmd_dump(int argc, char *argv[])
struct bch_fs *c = bch2_fs_open(argv, argc, opts);
if (IS_ERR(c))
- die("error opening %s: %s", argv[0], strerror(-PTR_ERR(c)));
+ die("error opening %s: %s", argv[0], bch2_err_str(PTR_ERR(c)));
down_read(&c->gc_lock);