posix_trace_attr_getname Subroutine

Purpose

Retrieves the trace name.

Library

Posix Trace Library (libposixtrace.a)

Syntax

#include <trace.h>

int posix_trace_attr_getname(attr, tracename)
const trace_attr_t *attr;
char *tracename;

Description

The posix_trace_attr_getname subroutine copies the string containing the trace name from the trace-name attribute of the attr object into the tracename parameter. The tracename parameter points to a string, and it is the address of a character array that can store at least TRACE_NAME_MAX characters (see limits.h File).

If the posix_trace_attr_getname subroutine is called with a non-initialized attributes object as parameter, the result is not specified.

Parameters

Item Description
attr Specifies the trace attributes object.
tracename Specifies where the trace-name attribute is stored.

Return Values

Upon successful completion, the posix_trace_attr_getname subroutine returns a value of zero. Otherwise, it returns the corresponding error number.

If successful, the posix_trace_attr_getname subroutine stores the trace name in the string pointed to by the tracename parameter. Otherwise, the content of this string is not specified.

Errors

The posix_trace_attr_getname subroutine fails if the following error number returns:
Item Description
EINVAL One of the parameters is null.

Files

The trace.h and the limits.h Files in AIX® Version 7.1 Files Reference