Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 25 Dec 1997 22:47:41 -0800
From:      Mark Smith <msmith@3-cities.com>
To:        freebsd-scsi@freebsd.org
Subject:   DAT question/problem!
Message-ID:  <34A3530D.590@3-cities.com>

next in thread | raw e-mail | index | archive | help
Greetings,

I'm currently trying to write a program that verifies DAT tapes for
recycling in the tape pool.

How do you detect the end of the tape?

I use open() to open the device, ioctl to rewind it and MTIOCGET
to get the device information.  mtget.mt_type reports a type 7
tape device which is a sun, this is a Python (see /var/log/message
snip later).  OK, I then do a write(mt,buff,size) in a loop to
write the block pattern out. I then receive a write=-1 and
errno = 5 (Input Output error).  Is this how it should be??

Dec 25 01:35:01 mark /kernel: ncr0 <ncr 53c810a fast10 scsi> rev 17 int
a irq 9 on pci0:11
Dec 25 01:35:01 mark /kernel: ncr0 waiting for scsi devices to settle
Dec 25 01:35:01 mark /kernel: (ncr0:1:0): "ARCHIVE Python 25588-XXX
2.96" type 1 removable SCSI 2
Dec 25 01:35:01 mark /kernel: st0(ncr0:1:0): Sequential-Access 
Dec 25 01:35:01 mark /kernel: st0(ncr0:1:0): asynchronous.
Dec 25 01:35:01 mark /kernel: st0(ncr0:1:0): M_REJECT received (1:8).
Dec 25 01:35:01 mark /kernel: density code 0x0, variable blocks,
write-enabled

Thanks!

Mark



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?34A3530D.590>