User Guide
5-20  Ampex 1308911-02
Model No.
Running Head
dst_format libdd2 API Functions
tapesize    (Read Only) Specifies tape cartridge size as one of the following values:
tapetype  (Read Only) Specifies the tape cartridge type as one of the following 
values:
DstTapeQuadData = 0x01, /* Quad density DD-2 data tape */
 DstTapeHiClean = 0x02, /* High abrasivity cleaning tape */
 DstTapeData = 0x05, /* User DD-2 data tape */
 DstTapeLoClean = 0x06, /* Low abrasivity cleaning tape */
 DstTapeMaint = 0x0e  /* Maintenance tape */
BUGS 
lastptsz always returns zero. 
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. Before a format command can be issued to the tape drive, dst_format() checks that a tape 
is installed and that it is not write protected.
If no tape is installed dst_format() returns 
-1 with errno set to EIO (5) and the 
DST result code set to
 DstCodeNoTapeInstalled.
If the installed tape is write protected, dst_format() returns with
 errno set to
EROFS (30) and the DST result code set to DstCodeTapeWriteProt.
2. If the
 DST_NO_REFORMAT interface parameter is set, the current tape is checked for a 
valid format. If the current tape is unformatted the format proceeds; otherwise 
dst_format() returns with
 errno set to EPERM (1) and the DST result code set to 
DstCodeNoPermission.
3. If a read or write command is attempted immediately after a format (i.e., before a 
position command is issued), zero bytes are returned and the DST result code is set to
DstCodeNotRdyNoPos.
DstSmall = 0x00, /* 25 Gb (50 Gb if double-density, 100 Gb if quad-density)*/
DstMedium = 0x01, /* 75 Gb (150 Gb if double-density, 300 Gb if quad-density) */
DstLarge = 0x02, /* 165 Gb (330 Gb if double-density, 660 Gb if quad-density) */
DstUnknown = 0xfe, /* Unknown tape size */
DstAbsent  = 0xff /* No tape present */










