File: elf_errmsg.3

package info (click to toggle)
elfutils 0.194-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 27,680 kB
  • sloc: ansic: 114,970; sh: 35,537; cpp: 4,998; makefile: 1,986; yacc: 1,388; lex: 130; asm: 77; sed: 39; awk: 35
file content (26 lines) | stat: -rw-r--r-- 1,182 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
.TH ELF_ERRMSG 3 2024-06-24 "Libelf" "Libelf Programmer's Manual"

.SH NAME
elf_errmsg \- return the error message string for a given libelf error code.

.SH SYNOPSIS
.B #include <libelf.h>

.BI "const char *elf_errmsg(int " err ");"

.SH DESCRIPTION
The \fBelf_errmsg\fP function retrieves a human-readable string corresponding to the most recent error code set by a libelf library function. If \fIerr\fP is 0, the function returns the error message for the most recent error code. If \fIerr\fP is non-zero, the function returns the error message for the specified error code.

.SH PARAMETERS
.TP
.I err
An \fIint\fP value specifying the error code. If this value is 0, the function returns the error message for the most recent error or NULL if none occurred. If this value is -1, the behaviour is similar to the previous case except that a legal string will be returned instead of NULL.

.SH RETURN VALUE
The \fBelf_errmsg\fP function returns a string containing the error message. If there is no corresponding error message, it returns NULL.

.SH SEE ALSO
.BR elf_errno (3)

.SH REPORTING BUGS
Report bugs to <elfutils-devel@sourceware.org> or https://sourceware.org/bugzilla/.