bsd man page for syserrlst

Query: syserrlst

OS: bsd

Section: 3

Format: Original Unix Latex Style Formatted with HTML and a Horizontal Scroll Bar

SYSERRLST(3)						     Library Functions Manual						      SYSERRLST(3)

NAME
syserrlst, __errlst - read system error messages from file
SYNOPSIS
char * syserrlst(err) int err; char * __errlst(err, path); int err; char *path;
DESCRIPTION
Syserrlst(3) reads the error message string corresponding to err from the file /etc/syserrlst. __errlst(3) reads the error message string corresponding to err from the file path. The file path must be in the format described in syserrlst(5). NULL is returned if err is out of bounds (negative or greater than the highest message number in /etc/syserrlst or path) or if the error message file can not be opened. It is the responsibility of the caller (strerror(3)) to check for and properly handle the NULL return.
RETURN VALUE
NULL if an error was encountered in opening the error message file, if the error was out of bounds, or if the file did not start with the correct magic number. Otherwise a char * is returned pointing to a static buffer containing the text of the error message.
ERRORS
syserrlst(3) and __errlst(3) can return any of the errors for the open(2), lseek(2), or read(2) system calls.
SEE ALSO
perror(3), strerror(3), syserrlst(5)
HISTORY
syserrlst(3), and __errlst(3) were created for 2.11BSD with the aim of saving 2kb of Data space in programs which called perror(3), or str- error(3).
BUGS
The information is stored in a static buffer. 3rd Berkeley Distribution March 26, 1996 SYSERRLST(3)
Related Man Pages
err(3) - bsd
err(3) - linux
verr(3) - linux
vwarnx(3) - linux
vwarn(3) - linux
Similar Topics in the Unix Linux Community
Performing an open/read, open/write
PCC-F-NOERRFILE, unable to open error message file, facility PR2
array bounds and mem leak tool
error message when use fork with open file
Confusing sed error message