STIOC_RESET_DRIVE
This IOCTL command issues a SCSI Send Diagnostic command to reset the tape drive. There are no arguments for this IOCTL command.
An example of the STIOC_RESET_DRIVE command
is
/* reset the tape drive */
if (ioctl(tapefd,STIOC_RESET_DRIVE,NULL)<0)
{
printf("IOCTL failure. errno=%d",errno);
exit(errno);
}