]> git.sesse.net Git - bcachefs-tools-debian/blobdiff - libbcachefs/errcode.c
Update bcachefs sources to f9c612bbf82d bcachefs: Fixes for building in userspace
[bcachefs-tools-debian] / libbcachefs / errcode.c
index dc906fc9176fecf9f8a7240ff78780a742367735..d260ff9bbfeb7b9121f222a4362f37f95c927977 100644 (file)
@@ -12,8 +12,6 @@ static const char * const bch2_errcode_strs[] = {
        NULL
 };
 
-#define BCH_ERR_0      0
-
 static unsigned bch2_errcode_parents[] = {
 #define x(class, err) [BCH_ERR_##err - BCH_ERR_START] = class,
        BCH_ERRCODES()
@@ -61,3 +59,10 @@ int __bch2_err_class(int err)
 
        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);
+}