User Guide

Ampex 1308911-02 5-39
libdd2 API Functions dst_getpos
} dst_position_st;
Before calling dst_getpos(), initialize the type member of the *pos structure with the
definition of the position specification you want the drive to return. The other members need not
be initialized.
RETURN VALUES
The return value is DST_SUCCESS (0) or DST_FAILURE (-1). See “DST API Overview” on
page 5-1 for information on
errno failure messages and associated DST result codes.
1. For end of file (EOF) or end of data (EOD), dst_getpos() succeeds and returns the actual
logical position. It does not return -1 to indicate EOF or EOD. Use dst_status() to determine
if the tape is at EOF or EOD.
2. If no tape is installed, dst_getpos() returns -1 with
errno set to EIO (5) and the DST
result code set to
DstCodeNoTapeInstalled.
3. If the tape is installed but the Ready/Not Ready button on the front panel is Not Ready,
dst_getpos() returns -1 with
errno set to EIO (5) and the DST result code set to
DstCodeNoEstablishedPos.
4. If the tape position cannot be determined, dst_getpos() returns -1 with
errno set to EIO
(5) and the DST result code set to DstCodeGetPosError.
5. dst_getpos() returns
EINVAL (22) if DST_FSN_VAIID, DST_DBN_VALID, and
DST_TIMECODE_VALID are set.
SEE ALSO
“DST API Overview” on page 5-1, dst_convpos(), dst_setpos(), dst_status(),
dd2_getpos_tape