diff options
author | Kent Overstreet <kent.overstreet@linux.dev> | 2023-09-23 18:42:30 -0400 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@linux.dev> | 2023-09-23 20:03:23 -0400 |
commit | a053ebfb8c89e023a44c365e369f4053cfc53376 (patch) | |
tree | c39f6a6689bbdeee358e824971d3e186ac4c3877 /libbcachefs/errcode.c | |
parent | 731926b5e5fc28752433f830569d228513cceea6 (diff) |
Update bcachefs sources to f9c612bbf82d bcachefs: Fixes for building in userspace
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'libbcachefs/errcode.c')
-rw-r--r-- | libbcachefs/errcode.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/libbcachefs/errcode.c b/libbcachefs/errcode.c index dc906fc9..d260ff9b 100644 --- a/libbcachefs/errcode.c +++ b/libbcachefs/errcode.c @@ -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); +} |