summaryrefslogtreecommitdiff
path: root/include/linux/errname.h
diff options
context:
space:
mode:
authorKent Overstreet <kent.overstreet@gmail.com>2022-08-10 20:28:55 -0400
committerKent Overstreet <kent.overstreet@gmail.com>2022-08-11 17:34:34 -0400
commitddac1641ee1e2686c2211a8d671ea723634dfc89 (patch)
tree0596db2376fb5cbdcd83bf1642efdc7868ade480 /include/linux/errname.h
parenta6128b5335a79cd68b9dbb6b083a835d94539d04 (diff)
Update bcachefs sources to 90a9c61e2b bcachefs: Switch bch2_btree_delete_range() to bch2_trans_run()
Diffstat (limited to 'include/linux/errname.h')
-rw-r--r--include/linux/errname.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/include/linux/errname.h b/include/linux/errname.h
new file mode 100644
index 00000000..443d5040
--- /dev/null
+++ b/include/linux/errname.h
@@ -0,0 +1,11 @@
+#ifndef _LINUX_ERRNAME_H
+#define _LINUX_ERRNAME_H
+
+#include <string.h>
+
+static inline const char *errname(int err)
+{
+ return strerror(abs(err));
+}
+
+#endif /* _LINUX_ERRNAME_H */