User Guide

Ampex 1308911-02 5-69
libdd2 API Functions dst_weof_ex
USAGE
1. If the DST_NO_FLUSH interface is set, all filemarks are written as buffered filemarks; i.e.,
the tape drive buffer will not flush to tape unless count is set to zero (thereby specifying
an explicit buffer flush).
2. If th
e DST_NO_FLUSH interface parameter is not set, the flush parameter specifies
whether to write buffered or unbuffered filemarks.
3. dst_weof_ex() fails if the current position is undefined.
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. If the tape installed is write protected, an
errno of EROFs (30) is returned and the
DST result code is set to
DstCodeWriteProt.
2. If a negative count is specified, an
errno of EINVAL (22) is returned and the DST
result code is set to
DstCodeNegativeFMCount.
3. SCSI only allows up to Oxffffff (16777215) filemarks to be written at a time. If the count
exceeds this value, an
errno of EINVAL (22) is returned and the DST result code is
set to
DstCodeBigFMCount.
4. When the
DST_ZERO_ON_EW interface parameter is not set and the user attempts to write
a filemark after early warning (EW) has been encountered, dst_weof_ex() returns -1 and
sets
errno to ENOSPC (28) to signify that the user should stop using the current
partition since it is close to full; this will occur regardless of whether the filemark is
written successfully. If the filemark is not written successfully,
errno will be set to EIO
(5).
When
DST_ZERO_ON_EW is set, dst_weof_ex() returns zero for a successfully written
filemark and -1 with
errno set to EIO (5) on failure.
SEE ALSO
dst_api_intro(), dst_weof(), dd2_weof_tape