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