From a053ebfb8c89e023a44c365e369f4053cfc53376 Mon Sep 17 00:00:00 2001 From: Kent Overstreet Date: Sat, 23 Sep 2023 18:42:30 -0400 Subject: Update bcachefs sources to f9c612bbf82d bcachefs: Fixes for building in userspace Signed-off-by: Kent Overstreet --- libbcachefs/errcode.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'libbcachefs/errcode.c') 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); +} -- cgit v1.2.3