]> git.sesse.net Git - bcachefs-tools-debian/blobdiff - include/linux/errname.h
Move c_src dirs back to toplevel
[bcachefs-tools-debian] / include / linux / errname.h
diff --git a/include/linux/errname.h b/include/linux/errname.h
new file mode 100644 (file)
index 0000000..443d504
--- /dev/null
@@ -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 */