Writing Monitors for the Event Monitoring Service (December 1999)
Chapter 2 57
The EMS Application Programming Interface (API)
Function Descriptions
rm_strerror
Used by resource monitors and target applications to format an EMS
error message to a buffer. Resource monitors that are also target
applications may call their own logging after calling rm_strerror().
Resource monitors may also call rm_log(), but target applications
normally cannot.
Function Prototype
int rm_strerror ( rm_error_type error_code,
char *err_buf, size_t len );
Parameters
err_buf
The buffer where the error string is to be stored. The memory
associated with this buffer must be allocated by the calling program.
error_code
The error that occurred from a previously called EMS API
function.
len
The length of the err_buf buffer. If the buffer is not long enough to
hold the entire error string, the string will be truncated. A length of at
least 256 bytes is recommended to hold any error string.
Returned Value
Upon successful completion, rm_strerror() returns 0. If an error
occurs, the value returned is -1.