Main index | Section 3 | Options |
#include <libelf.h>
Function elf_errno() is used to retrieve the last error recorded by the ELF library. Invoking this function has the side-effect of resetting the ELF library's recorded error number to zero.
The function elf_errmsg() returns a null-terminated string with a human readable description of the error specified in argument error. A zero value for argument error retrieves the most recent error encountered by the ELF library. An argument value of -1 behaves identically, except that it guarantees a non-NULL return from elf_errmsg().
Function elf_errmsg() returns a pointer to library local storage for non-zero values of argument error. With a zero argument, the function will return a NULL pointer if no error had been encountered by the library, or will return a pointer to library local storage containing an appropriate message otherwise.
/* clear error */ (void) elf_errno();
Retrieving a human-readable description of the current error number can be done with the following snippet:
int err; const char *errmsg; amp;... err = elf_errno(); if (err != 0) errmsg = elf_errmsg(err);
ELF_ERRMSG (3) | June 11, 2006 |
Main index | Section 3 | Options |
Please direct any comments about this manual page service to Ben Bullock. Privacy policy.
“ | How's my programming? Call 1-800-DEV-NULL | ” |