]>
Commit | Line | Data |
---|---|---|
fea681da | 1 | .\" Copyright 2002 walter harms (walter.harms@informatik.uni-oldenburg.de) |
2297bf0e | 2 | .\" |
95fb8859 | 3 | .\" SPDX-License-Identifier: GPL-1.0-or-later |
fea681da MK |
4 | .\" adapted glibc info page |
5 | .\" | |
6 | .\" polished a little, aeb | |
45186a5d | 7 | .TH ADDSEVERITY 3 2021-03-22 "Linux man-pages (unreleased)" |
fea681da MK |
8 | .SH NAME |
9 | addseverity \- introduce new severity classes | |
b813014f AC |
10 | .SH LIBRARY |
11 | Standard C library | |
12 | .RI ( libc ", " \-lc ) | |
fea681da MK |
13 | .SH SYNOPSIS |
14 | .nf | |
68e4db0a | 15 | .PP |
fea681da | 16 | .B #include <fmtmsg.h> |
68e4db0a | 17 | .PP |
fea681da | 18 | .BI "int addseverity(int " severity ", const char *" s ); |
fea681da | 19 | .fi |
68e4db0a | 20 | .PP |
d39ad78f | 21 | .RS -4 |
cc4615cc MK |
22 | Feature Test Macro Requirements for glibc (see |
23 | .BR feature_test_macros (7)): | |
d39ad78f | 24 | .RE |
68e4db0a | 25 | .PP |
cc4615cc | 26 | .BR addseverity (): |
9d281e06 | 27 | .nf |
51c612fb MK |
28 | Since glibc 2.19: |
29 | _DEFAULT_SOURCE | |
30 | Glibc 2.19 and earlier: | |
31 | _SVID_SOURCE | |
9d281e06 | 32 | .fi |
fea681da MK |
33 | .SH DESCRIPTION |
34 | This function allows the introduction of new severity classes | |
35 | which can be addressed by the | |
36 | .I severity | |
c4bb193f | 37 | argument of the |
fea681da | 38 | .BR fmtmsg (3) |
c13182ef | 39 | function. |
fb8d1da0 | 40 | By default, that function knows only how to |
fea681da | 41 | print messages for severity 0-4 (with strings (none), HALT, |
c13182ef MK |
42 | ERROR, WARNING, INFO). |
43 | This call attaches the given string | |
fea681da MK |
44 | .I s |
45 | to the given value | |
46 | .IR severity . | |
47 | If | |
48 | .I s | |
49 | is NULL, the severity class with the numeric value | |
50 | .I severity | |
51 | is removed. | |
52 | It is not possible to overwrite or remove one of the default | |
c13182ef | 53 | severity classes. |
2fda57bd | 54 | The severity value must be nonnegative. |
47297adb | 55 | .SH RETURN VALUE |
fea681da MK |
56 | Upon success, the value |
57 | .B MM_OK | |
c13182ef MK |
58 | is returned. |
59 | Upon error, the return value is | |
fea681da MK |
60 | .BR MM_NOTOK . |
61 | Possible errors include: out of memory, attempt to remove a | |
62 | nonexistent or default severity class. | |
c343e74c MK |
63 | .SH VERSIONS |
64 | .BR addseverity () | |
65 | is provided in glibc since version 2.1. | |
fae930d4 MS |
66 | .SH ATTRIBUTES |
67 | For an explanation of the terms used in this section, see | |
68 | .BR attributes (7). | |
c466875e MK |
69 | .ad l |
70 | .nh | |
fae930d4 MS |
71 | .TS |
72 | allbox; | |
c466875e | 73 | lbx lb lb |
fae930d4 MS |
74 | l l l. |
75 | Interface Attribute Value | |
76 | T{ | |
77 | .BR addseverity () | |
78 | T} Thread safety MT-Safe | |
79 | .TE | |
c466875e MK |
80 | .hy |
81 | .ad | |
82 | .sp 1 | |
3113c7f3 | 83 | .SH STANDARDS |
fea681da | 84 | This function is not specified in the X/Open Portability Guide |
c13182ef | 85 | although the |
fb186734 | 86 | .BR fmtmsg (3) |
c13182ef MK |
87 | function is. |
88 | It is available on System V | |
fea681da | 89 | systems. |
2b2581ee MK |
90 | .SH NOTES |
91 | New severity classes can also be added by setting the environment variable | |
92 | .BR SEV_LEVEL . | |
47297adb | 93 | .SH SEE ALSO |
cc4615cc | 94 | .BR fmtmsg (3) |