1fmtmsg.h(0P) POSIX Programmer's Manual fmtmsg.h(0P)
2
3
4
6 This manual page is part of the POSIX Programmer's Manual. The Linux
7 implementation of this interface may differ (consult the corresponding
8 Linux manual page for details of Linux behavior), or the interface may
9 not be implemented on Linux.
10
12 fmtmsg.h — message display structures
13
15 #include <fmtmsg.h>
16
18 The <fmtmsg.h> header shall define the following symbolic constants:
19
20 MM_HARD Source of the condition is hardware.
21
22 MM_SOFT Source of the condition is software.
23
24 MM_FIRM Source of the condition is firmware.
25
26 MM_APPL Condition detected by application.
27
28 MM_UTIL Condition detected by utility.
29
30 MM_OPSYS Condition detected by operating system.
31
32 MM_RECOVER Recoverable error.
33
34 MM_NRECOV Non-recoverable error.
35
36 MM_HALT Error causing application to halt.
37
38 MM_ERROR Application has encountered a non-fatal fault.
39
40 MM_WARNING Application has detected unusual non-error condition.
41
42 MM_INFO Informative message.
43
44 MM_NOSEV No severity level provided for the message.
45
46 MM_PRINT Display message on standard error.
47
48 MM_CONSOLE Display message on system console.
49
50 The table below indicates the null values and identifiers for fmtmsg()
51 arguments. The <fmtmsg.h> header shall define the symbolic constants in
52 the Identifier column, which shall have the type indicated in the Type
53 column:
54
55 ┌─────────┬────────┬────────────┬────────────┐
56 │Argument │ Type │ Null-Value │ Identifier │
57 ├─────────┼────────┼────────────┼────────────┤
58 │label │ char * │ (char*)0 │ MM_NULLLBL │
59 │severity │ int │ 0 │ MM_NULLSEV │
60 │class │ long │ 0L │ MM_NULLMC │
61 │text │ char * │ (char*)0 │ MM_NULLTXT │
62 │action │ char * │ (char*)0 │ MM_NULLACT │
63 │tag │ char * │ (char*)0 │ MM_NULLTAG │
64 └─────────┴────────┴────────────┴────────────┘
65 The <fmtmsg.h> header shall also define the following symbolic con‐
66 stants for use as return values for fmtmsg():
67
68 MM_OK The function succeeded.
69
70 MM_NOTOK The function failed completely.
71
72 MM_NOMSG The function was unable to generate a message on standard
73 error, but otherwise succeeded.
74
75 MM_NOCON The function was unable to generate a console message,
76 but otherwise succeeded.
77
78 The following shall be declared as a function and may also be defined
79 as a macro. A function prototype shall be provided.
80
81
82 int fmtmsg(long, const char *, int,
83 const char *, const char *, const char *);
84
85 The following sections are informative.
86
88 None.
89
91 None.
92
94 None.
95
97 The System Interfaces volume of POSIX.1‐2017, fmtmsg()
98
100 Portions of this text are reprinted and reproduced in electronic form
101 from IEEE Std 1003.1-2017, Standard for Information Technology -- Por‐
102 table Operating System Interface (POSIX), The Open Group Base Specifi‐
103 cations Issue 7, 2018 Edition, Copyright (C) 2018 by the Institute of
104 Electrical and Electronics Engineers, Inc and The Open Group. In the
105 event of any discrepancy between this version and the original IEEE and
106 The Open Group Standard, the original IEEE and The Open Group Standard
107 is the referee document. The original Standard can be obtained online
108 at http://www.opengroup.org/unix/online.html .
109
110 Any typographical or formatting errors that appear in this page are
111 most likely to have been introduced during the conversion of the source
112 files to man page format. To report such errors, see https://www.ker‐
113 nel.org/doc/man-pages/reporting_bugs.html .
114
115
116
117IEEE/The Open Group 2017 fmtmsg.h(0P)