diff mbox series

[10/20] lib: Export errname

Message ID 20230712211115.2174650-11-kent.overstreet@linux.dev (mailing list archive)
State New, archived
Headers show
Series bcachefs prereqs patch series | expand

Commit Message

Kent Overstreet July 12, 2023, 9:11 p.m. UTC
errname() returns the name of an errcode; this functionality is
otherwise only available for error pointers via %pE - bcachefs uses this
for better error messages.

Signed-off-by: Christopher James Halse Rogers <raof@ubuntu.com>
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
---
 lib/errname.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Eric Biggers July 13, 2023, 7:10 a.m. UTC | #1
On Wed, Jul 12, 2023 at 05:11:05PM -0400, Kent Overstreet wrote:
> errname() returns the name of an errcode; this functionality is
> otherwise only available for error pointers via %pE - bcachefs uses this
> for better error messages.

Interesting that this exists!  It seems you meant %pe, not %pE, though.

- Eric
diff mbox series

Patch

diff --git a/lib/errname.c b/lib/errname.c
index 67739b174a..dd1b998552 100644
--- a/lib/errname.c
+++ b/lib/errname.c
@@ -228,3 +228,4 @@  const char *errname(int err)
 
 	return err > 0 ? name + 1 : name;
 }
+EXPORT_SYMBOL(errname);