summaryrefslogtreecommitdiff
path: root/tools/lib/bpf/str_error.h
diff options
context:
space:
mode:
Diffstat (limited to 'tools/lib/bpf/str_error.h')
-rw-r--r--tools/lib/bpf/str_error.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/tools/lib/bpf/str_error.h b/tools/lib/bpf/str_error.h
index 626d7ffb03d6..53e7fbffc13e 100644
--- a/tools/lib/bpf/str_error.h
+++ b/tools/lib/bpf/str_error.h
@@ -6,4 +6,14 @@
char *libbpf_strerror_r(int err, char *dst, int len);
+/**
+ * @brief **libbpf_errstr()** returns string corresponding to numeric errno
+ * @param err negative numeric errno
+ * @return pointer to string representation of the errno, that is invalidated
+ * upon the next call.
+ */
+const char *libbpf_errstr(int err);
+
+#define errstr(err) libbpf_errstr(err)
+
#endif /* __LIBBPF_STR_ERROR_H */