addseverityのヘルプ・マニュアル
日本語 英語
addseverity --help
man addseverity
ADDSEVERITY(3) Linux Programmer’s Manual ADDSEVERITY(3)
名前
addseverity - 新しい重大度 (severity class) を導入する
書式
#include
int addseverity(int severity, const char *s);
glibc 向けの機能検査マクロの要件 (feature_test_macros(7) 参照):
addseverity(): _SVID_SOURCE
説明
この関数により、新しい重大度を導入できる。この重大度は、 fmtmsg(3) 関数
の severity 引き数に入れることができる。デフ ォ ル ト で は 、 後 者 の
fmtmsg(3) 関 数は重大度 0-4 (文字列では (none), HALT, ERROR, WARNING,
INFO) のメッセージを表示する方法しか知らない。この addseverity(3) の 呼
び出しにより、指定された文字列 s に指定された値 severity を付加する。 s
が NULL の場合、数値 severity の重大度が削除される。デフォルトの重大 度
の どれかを上書きしたり削除したりすることはできない。重大度の値は負でな
い数としなければならない。
返り値
成功した場合、値 MM_OK が返される。エラーの場合、返り値は MM_NOTOK であ
る 。起こる可能性があるエラーには、以下のものが含まれる: メモリを使い果
たした。存在しない重大度またはデフォルトの重大度を削除しようとした。
バージョン
addseverity() はバージョン 2.1 以降の glibc で提供されている。
準拠
fmtmsg(3) 関数は X/Open Portability Guide に指定されているが、この関 数
は指定されていない。この関数は System V システムで利用可能である。
注意
新しい重大度は、環境変数 SEV_LEVEL を設定することで追加することもできる
。
関連項目
fmtmsg(3)
GNU 2008-06-14 ADDSEVERITY(3)
ADDSEVERITY(3) Linux Programmer’s Manual ADDSEVERITY(3)
NAME
addseverity - introduce new severity classes
SYNOPSIS
#include
int addseverity(int severity, const char *s);
Feature Test Macro Requirements for glibc (see feature_test_macros(7)):
addseverity(): _SVID_SOURCE
DESCRIPTION
This function allows the introduction of new severity classes which can
be addressed by the severity argument of the fmtmsg(3) function. By
default that latter function only knows how to print messages for
severity 0-4 (with strings (none), HALT, ERROR, WARNING, INFO). This
call attaches the given string s to the given value severity. If s is
NULL, the severity class with the numeric value severity is removed.
It is not possible to overwrite or remove one of the default severity
classes. The severity value must be non-negative.
RETURN VALUE
Upon success, the value MM_OK is returned. Upon error, the return
value is MM_NOTOK. Possible errors include: out of memory, attempt to
remove a nonexistent or default severity class.
VERSIONS
addseverity() is provided in glibc since version 2.1.
CONFORMING TO
This function is not specified in the X/Open Portability Guide although
the fmtmsg(3) function is. It is available on System V systems.
NOTES
New severity classes can also be added by setting the environment vari-
able SEV_LEVEL.
SEE ALSO
fmtmsg(3)
COLOPHON
This page is part of release 3.22 of the Linux man-pages project. A
description of the project, and information about reporting bugs, can
be found at http://www.kernel.org/doc/man-pages/.
GNU 2008-06-14 ADDSEVERITY(3)