2018-10-05 16:40:00 -07:00
|
|
|
/* SPDX-License-Identifier: (LGPL-2.1 OR BSD-2-Clause) */
|
2018-10-03 15:26:42 -07:00
|
|
|
#ifndef __LIBBPF_STR_ERROR_H
|
|
|
|
#define __LIBBPF_STR_ERROR_H
|
2018-09-14 16:47:14 -03:00
|
|
|
|
2024-01-23 18:21:20 -08:00
|
|
|
#define STRERR_BUFSIZE 128
|
|
|
|
|
2018-10-03 15:26:41 -07:00
|
|
|
char *libbpf_strerror_r(int err, char *dst, int len);
|
2024-01-23 18:21:20 -08:00
|
|
|
|
2024-11-11 21:29:16 +00:00
|
|
|
/**
|
2025-03-20 15:24:39 -07:00
|
|
|
* @brief **libbpf_errstr()** returns string corresponding to numeric errno
|
2024-11-11 21:29:16 +00:00
|
|
|
* @param err negative numeric errno
|
|
|
|
* @return pointer to string representation of the errno, that is invalidated
|
|
|
|
* upon the next call.
|
|
|
|
*/
|
2025-03-20 15:24:39 -07:00
|
|
|
const char *libbpf_errstr(int err);
|
|
|
|
|
|
|
|
#define errstr(err) libbpf_errstr(err)
|
|
|
|
|
2018-10-03 15:26:42 -07:00
|
|
|
#endif /* __LIBBPF_STR_ERROR_H */
|