Go to main content

man pages section 3: Extended Library Functions, Volume 2

Exit Print View

Updated: Thursday, June 13, 2019
 
 

dtrace_errmsg (3DTRACE)

Name

dtrace_errno, dtrace_errmsg - libdtrace error processing

Synopsis

     cc [ flag... ] file... -ldtrace [ library... ]
     #include <dtrace.h>

     int dtrace_errno(dtrace_hdl_t *dtp)

     const char *dtrace_errmsg(dtrace_hdl_t *dtp, int error)

Description

The dtrace_errno() function returns the error number stored in the DTrace handle, dtp, provided the value of dtp is not NULL. The error number is set on failure of a libdtrace function call. If, however, the dtp argument is NULL, the dtrace_errno() function returns the value, errno.

The dtrace_errmsg() function returns a pointer to the error message string associated with a particular DTrace error number and corresponding to the error argument.

Return Values

If dtp is NULL, the dtrace_errno() function returns errno. If dtp is non-NULL, the dtrace_errno() function returns the error number stored in the DTrace handle.

The dtrace_errmsg() function returns a pointer to a string indicating the error message corresponding to the error argument.

Errors

None

Examples

See the libdtrace(3LIB) man page for an example of using the dtrace_errmsg() and dtrace_errno() functions.

Attributes

See attributes(7) for descriptions of the following attributes:

ATTRIBUTE TYPE
ATTRIBUTE VALUE
Architecture
all
Availability
system/dtrace
Interface Stability
Committed
MT-Level
Safe

See Also

libdtrace(3LIB)