Tape erase program.

From: VS Prasad <vs_p_at_hotmail.com>
Date: Wed, 11 Jul 2001 13:18:21 +0000

Hi All,

         I am getting the error "No such device or address" when I try to
erase the tape. But the same device name works fine with my scu -f mt erase
command to erase my tape.
I could n't able to find where I am going wrong.

main(argc, argv)
int argc ;
char *argv[] ;
{
        struct mtop mt;
        int fd;
        mt.mt_op = MTERASE;
        mt.mt_count = 1;

        if((fd = open("/dev/ntape/tape6", O_RDONLY|O_NONBLOCK|O_NDELAY)) ==
-1 )
        {
                perror("Open");
                exit(0);
        }


      if( ioctl(fd, MTIOCTOP, &mt) == -1 )
        {
                perror("MTERASE");
                exit(0);
        }

}

Thanks in advance,

Srinivas.

_________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.
Received on Wed Jul 11 2001 - 13:19:09 NZST

This archive was generated by hypermail 2.4.0 : Wed Nov 08 2023 - 11:53:42 NZDT