6 tep_strerror - Returns a string describing regular errno and tep error number.
12 *#include <event-parse.h>*
14 int *tep_strerror*(struct tep_handle pass:[*]_tep_, enum tep_errno _errnum_, char pass:[*]_buf_, size_t _buflen_);
19 The _tep_strerror()_ function converts tep error number into a human
21 The _tep_ argument is trace event parser context. The _errnum_ is a regular
22 errno, defined in errno.h, or a tep error number. The string, describing this
23 error number is copied in the _buf_ argument. The _buflen_ argument is
24 the size of the _buf_.
26 It as a thread safe wrapper around strerror_r(). The library function has two
27 different behaviors - POSIX and GNU specific. The _tep_strerror()_ API always
28 behaves as the POSIX version - the error string is copied in the user supplied
33 The _tep_strerror()_ function returns 0, if a valid _errnum_ is passed and the
34 string is copied into _buf_. If _errnum_ is not a valid error number,
35 -1 is returned and _buf_ is not modified.
41 #include <event-parse.h>
43 struct tep_handle *tep = tep_alloc();
46 char *pool = calloc(1, 128);
48 tep_strerror(tep, TEP_ERRNO__MEM_ALLOC_FAILED, buf, 32);
49 printf ("The pool is not initialized, %s", buf);
59 Header file to include in order to have access to the library APIs.
61 Linker switch to add when building a program that uses the library.
66 _libtraceevent(3)_, _trace-cmd(1)_
72 *Steven Rostedt* <rostedt@goodmis.org>, author of *libtraceevent*.
73 *Tzvetomir Stoyanov* <tz.stoyanov@gmail.com>, author of this man page.
77 Report bugs to <linux-trace-devel@vger.kernel.org>
81 libtraceevent is Free Software licensed under the GNU LGPL 2.1
85 https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git