1SYSERRLST(3) Library Functions Manual SYSERRLST(3)
2
3
4
6 syserrlst, __errlst - read system error messages from file
7
9 char *
10 syserrlst(err)
11 int err;
12
13 char *
14 __errlst(err, path);
15 int err;
16 char *path;
17
19 Syserrlst(3) reads the error message string corresponding to err from
20 the file /etc/syserrlst.
21
22 __errlst(3) reads the error message string corresponding to err from
23 the file path. The file path must be in the format described in syser‐
24 rlst(5).
25
26 NULL is returned if err is out of bounds (negative or greater than the
27 highest message number in /etc/syserrlst or path) or if the error mes‐
28 sage file can not be opened. It is the responsibility of the caller
29 (strerror(3)) to check for and properly handle the NULL return.
30
32 NULL if an error was encountered in opening the error message file, if
33 the error was out of bounds, or if the file did not start with the cor‐
34 rect magic number. Otherwise a char * is returned pointing to a static
35 buffer containing the text of the error message.
36
38 syserrlst(3) and __errlst(3) can return any of the errors for the
39 open(2), lseek(2), or read(2) system calls.
40
42 perror(3), strerror(3), syserrlst(5)
43
45 syserrlst(3), and __errlst(3) were created for 2.11BSD with the aim of
46 saving 2kb of Data space in programs which called perror(3), or str‐
47 error(3).
48
50 The information is stored in a static buffer.
51
52
53
543rd Berkeley Distribution March 26, 1996 SYSERRLST(3)