User Guide
Ampex 1308911-02 vii
DST/DIS Tape Drive UNIX Programmer’s Guide Addendum
dst_getptpathname()
NAME
dst_getptpathname()
 - get 
devscsi
 pathname needed for 
libdd2
 API passthru (
*_pt
) 
functions.
SYNOPSIS
#
include <dd2.h>
int dst_getptpathname(int 
fd
, char 
*devscsi_name
, int 
namelen
);
DESCRIPTION
dst_getptpathname() retrieves the 
devscsi
 pathname of an open 
tpsc
 scsi device. It is available 
to all users.
PARAMETERS
fd
The 
tpsc
 file descriptor returned by the 
open
 call.
*devscsi_name Pointer to a buffer allocated for storage of the devscsi path name.
noflush_setting The size of the buffer (number of bytes). The buffer must be large 
enough to hold the full pathname plus the terminating zero byte; i.e., 
max pathname size = 256 bytes + 1.
NOTES
The scsi device should have permissions set to allow read and write.
In order to use a libdd2 
*_pt function:
1. open() the tpsc device driver for mt operation.
2. Use dst_getptpathname() to obtain the devscsi path name.
3. Close the tpsc file descriptor and obtain a new file descriptor by opening the scsi device 
using the devscsi path name.
4. Use the file descriptor returned by the devscsi open() call for the
 *_pt function call. 
When through, close the pt file descriptor and reopen the original tpsc device to obtain a new 
tpsc file descriptor.










