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