NULL
};
-#define BCH_ERR_0 0
-
static unsigned bch2_errcode_parents[] = {
#define x(class, err) [BCH_ERR_##err - BCH_ERR_START] = class,
BCH_ERRCODES()
const char *bch2_err_str(int err)
{
const char *errstr;
+
err = abs(err);
BUG_ON(err >= BCH_ERR_MAX);
return -err;
}
+
+const char *bch2_blk_status_to_str(blk_status_t status)
+{
+ if (status == BLK_STS_REMOVED)
+ return "device removed";
+ return blk_status_to_str(status);
+}