HP-UX Reference (11i v2 04/09) - 3 Library Functions A-M (vol 6)

f
fmtmsg(3C) fmtmsg(3C)
The tag component is intended to direct the user to the appropriate documentation to correct or avoid the
error. It may be disabled by setting tag to
MM_NULLTXT or RMM_NULL.
EXTERNAL INFLUENCES
The user may control the appearance of the message produced on standard error through the use of two
environment variables:
MSGVERB and SEV_LEVEL. These have no effect on the console message.
The
MSGVERB environment variable describes the components the user is interested in seeing. The value
of MSGVERB is a list of one or more components, separated by colons if more than one is specified. All
components with non-NULL values listed in MSGVERB are displayed when
fmtmsg() is called; all other
components are excluded. Only the component names label , severity , text, action, and tag are valid list
elements. Any others (or an empty list) are considered an error in
MSGVERB format. If MSGVERB is
erroneous or unset,
fmtmsg() produces the full message.
The
SEV_LEVEL environment variable gives users control over the text string displayed for the severity
component if the severity is other than those described above. The predefined severity levels (
MM_NOSEV
through MM_HALT) cannot be overridden.
The value of
SEV_LEVEL is a list of one or more level specifiers separated by colons. A level specifier is a
three item comma list of the form identifier, level, message. The identifier is not used by
fmtmsg(), and
is only included for compatibility. It is not optional, however, as
fmtmsg() expects it when examining
level specifiers for the other two parts. The level is a number greater than four indicating the level
defined. The message is a string to be displayed in the
severity field, in the same manner as
HALT
and INFO are displayed for the MM_HALT and MM_INFO severities. Level specifiers having more or
fewer than three items are invalid, as are null level specifiers. Invalid or null valued
SEV_LEVEL lists
have no impact on the behavior of
fmtmsg().
RETURN VALUE
The
fmtmsg() routine returns one of the following values on exit:
MM_OK Success.
MM_NOTOK Failure.
MM_NOMSG Failure to standard error, success to the system console.
MM_NOCON Success to standard error, failure to the system console.
AUTHOR
fmtmsg() was developed by OSF and HP.
SEE ALSO
printf(3S), thread_safety(5).
STANDARDS COMPLIANCE
fmtmsg: SVID3
Section 3332 Hewlett-Packard Company 2 HP-UX 11i Version 2: September 2004