|
NAMEelf_errmsg , elf_errno —
ELF library error message handling
LIBRARYELF Access Library (libelf, -lelf)SYNOPSIS#include <libelf.h>
int
const char *
DESCRIPTIONWhen an error occurs during an ELF library API call, the library encodes the error using an error number and stores the error number internally for retrieval by the application at a later point of time. Error numbers may contain an OS supplied error code in addition to an ELF API specific error code. An error number value of zero indicates no error.Function The function RETURN VALUESFunctionelf_errno () returns a non-zero value encoding
the last error encountered by the ELF library, or zero if no error was
encountered.
Function EXAMPLESClearing the ELF library's recorded error number can be accomplished by invokingelf_errno () and discarding its return value.
/* 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; ... err = elf_errno(); if (err != 0) errmsg = elf_errmsg(err); SEE ALSOelf(3), gelf(3)BUGSFunctionelf_errmsg () is not localized.
Visit the GSP FreeBSD Man Page Interface. |