User Guide

5-42 Ampex 1308911-02
Model No.
Running Head
dst_gettrace libdd2 API Functions
5.12 dst_gettrace
NAME
dst_gettrace() - get a firmware trace log from the tape drive.
SYNOPSIS
#include <dd2.h>
int dst_gettrace(int fd, dst_trace_st *trace);
DESCRIPTION
dst_gettrace() gets one of the four available tape drive firmware trace logs. This information
is intended to aid service personnel in diagnosing and correcting problems.
A trace log consists of printable ASCII characters. Within the log, each ASCII line feed
character indicates a new line. You can retrieve an entire log or just the last (most recent) line.
dst_gettrace() is available to all users.
PARAMETERS
fd The file descriptor returned by the open call.
*trace Pointer to a structure of type
dst_trace_st.
USAGE
dst_gettrace() uses the *trace structure for both input and output. Before calling
dst_gettrace(), initialize the structure appropriately.
typedef struct
{
dst_trace_type_en type; /* Trace log type */
int start; /* Starting line, from end */
int size; /* Size of trace buffer */
int offset; /* Offset before data required */
int length; /* Size of complete log*/
int no_of_lines; /* Number of lines in complete log */
caddr_t buf; /* Pointer to trace buffer */
} dst_trace_st;
The log data is loaded into the trace buffer that the buf member points to. On input, the size
member specifies the capacity of the buffer. On return, the size member specifies the
number of bytes stored in the buffer