struct bch_sb_handle sb;
int ret = bch2_read_super(dev, &opts, &sb);
if (ret)
- die("Error opening %s: %s", dev, strerror(-ret));
+ die("Error opening %s: %s", dev, bch2_err_str(ret));
if (!bch2_sb_is_encrypted(sb.sb))
die("%s is not encrypted", dev);
c = bch2_fs_open(argv + 1, argc - 1, opts);
if (IS_ERR(c))
- die("Error opening %s: %s", argv[1], strerror(-PTR_ERR(c)));
+ die("Error opening %s: %s", argv[1], bch2_err_str(PTR_ERR(c)));
struct bch_sb_field_crypt *crypt = bch2_sb_get_crypt(c->disk_sb.sb);
if (!crypt)
opt_set(opts, nostart, true);
c = bch2_fs_open(argv + 1, argc - 1, opts);
if (IS_ERR(c))
- die("Error opening %s: %s", argv[1], strerror(-PTR_ERR(c)));
+ die("Error opening %s: %s", argv[1], bch2_err_str(PTR_ERR(c)));
struct bch_sb_field_crypt *crypt = bch2_sb_get_crypt(c->disk_sb.sb);
if (!crypt)