User Guide
Ampex 1308911-02 5-63
libdd2 API Functions dst_unload
5.20 dst_unload 
NAME 
dst_unload() - unload the tape cartridge from the tape drive.
SYNOPSIS 
#include <dd2.h> 
 int dst_unload(int fd); 
DESCRIPTION 
dst_unload() flushes any data still in the tape drive write buffer to tape, parks the tape at the 
nearest system zone on the BOT side of the current position, and ejects the cartridge. System 
zone locations depend on the tape format and might not correspond to the start of a partition. 
This means that the only way to ensure that a tape unloads at BOT is to position it there before 
calling dst_unload(). For information on absolute and relative positioning, see dst_setpos(), 
and dst_space().
dst_unload() invalidates any state information associated with the tape. For example, the 
current position, tape format, and similar status are undefined after executing dst_unload().
dst_unload() is available to all users.
PARAMETERS
fd The file descriptor returned by the open call.
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.
SEE ALSO 
dst_api_intro(), dd2_unload_tape, DST SCSI Tape Drive DD-2 Tape Format Guide 










