posix_trace_attr_getgenversion Subroutine

Purpose

Retrieves the version of a trace stream.

Library

Posix Trace Library (libposixtrace.a)

Syntax

#include <trace.h>

int posix_trace_attr_getgenversion(attr, genversion)
const trace_attr_t *attr;
char *genversion;

Description

The posix_trace_attr_getgenversion subroutine copies the string containing version information from the version attribute of the attr object into the genversion parameter. The attr parameter represents the generation version. The value of the genversion parameter points to a string. The genversion parameter is the address of a character array that can store at least the number of characters defined by the TRACE_NAME_MAX characters (see limits.h File).

If this 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.
genversion Specifies where the version attribute is stored.

Return Values

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

If successful, the posix_trace_attr_getgenversion subroutine stores the trace version information in the string pointed to by the genversion parameter. Otherwise, the content of this string is not specified.

Errors

The posix_trace_attr_getgenversion 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