printf: add support for printing symbolic error names
[linux-2.6-microblaze.git] / include / linux / errname.h
diff --git a/include/linux/errname.h b/include/linux/errname.h
new file mode 100644 (file)
index 0000000..e8576ad
--- /dev/null
@@ -0,0 +1,16 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+#ifndef _LINUX_ERRNAME_H
+#define _LINUX_ERRNAME_H
+
+#include <linux/stddef.h>
+
+#ifdef CONFIG_SYMBOLIC_ERRNAME
+const char *errname(int err);
+#else
+static inline const char *errname(int err)
+{
+       return NULL;
+}
+#endif
+
+#endif /* _LINUX_ERRNAME_H */