libctf: error handling
CTF functions return zero on success or an extended errno value which can be translated into a string via the functions in this commit. The errno numbers start at -CTF_BASE. libctf/ * ctf-error.c: New file. include/ * ctf-api.h (ctf_errno): New declaration. (ctf_errmsg): Likewise.
This commit is contained in:
parent
94585e7f93
commit
479604f44f
4 changed files with 104 additions and 0 deletions
|
@ -122,6 +122,8 @@ enum
|
|||
#define CTF_ADD_NONROOT 0 /* Type only visible in nested scope. */
|
||||
#define CTF_ADD_ROOT 1 /* Type visible at top-level scope. */
|
||||
|
||||
extern int ctf_errno (ctf_file_t *);
|
||||
extern const char *ctf_errmsg (int);
|
||||
|
||||
extern void ctf_setdebug (int debug);
|
||||
extern int ctf_getdebug (void);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue