From 03ea3962ab99adf0cf7de9949716e6baeda230f3 Mon Sep 17 00:00:00 2001 From: Kent Overstreet Date: Tue, 4 Jan 2022 19:05:08 -0500 Subject: bcachefs: Log & error message improvements - Add a shim uuid_unparse_lower() in the kernel, since %pU doesn't work in userspace - We don't need to print the bcachefs: or the filesystem name prefix in userspace - Improve a few error messages Signed-off-by: Kent Overstreet --- fs/bcachefs/util.h | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'fs/bcachefs/util.h') diff --git a/fs/bcachefs/util.h b/fs/bcachefs/util.h index 969139fef086..fbe5b710e9c5 100644 --- a/fs/bcachefs/util.h +++ b/fs/bcachefs/util.h @@ -764,4 +764,13 @@ static inline int u8_cmp(u8 l, u8 r) return cmp_int(l, r); } +#ifdef __KERNEL__ +static inline void uuid_unparse_lower(u8 *uuid, char *out) +{ + sprintf(out, "%plU", uuid); +} +#else +#include +#endif + #endif /* _BCACHEFS_UTIL_H */ -- cgit v1.2.3