Subject: kern/21503: empty SCSI tape drives cannot be queried or configured
To: None <>
From: Ben Harris <>
List: netbsd-bugs
Date: 05/08/2003 23:41:08
I can't reproduce this bug on my SCSI tape drive:

viking:~# uname -a
NetBSD viking 1.6 NetBSD 1.6 (VIKING) #0: Wed Oct 30 01:15:29 GMT 2002     bjh21@viking:/usr/src/sys/arch/macppc/compile/VIKING macppc
viking:~# grep ^st0 /var/run/dmesg.boot
st0 at scsibus0 target 4 lun 0: <HP, T4000s, 1.10> SCSI2 1/sequential removable
st0: rogue, drive empty
st0: async, 8-bit transfers
viking:~# scsictl /dev/enrst0 identify
/dev/enrst0: scsibus0 target 4 lun 0 <HP, T4000s, 1.10>
viking:~# mt -f /dev/enrst0 status
SCSI tape drive, residual=0
blocksize: 0 (0, 0, 0, 0)
density: 0 (69, 69, 69, 69)
current file number: 0
current block number: 0

I've just checked, and there's no tape in it.  It's possible that either
my tape drive's weird, or that this bug has crept in since 1.6, of course.
The fact that "mt" uses /dev/nrst0 as its default device, rather than
/dev/enrst0, is probably worthy of a PR of its own, anyway.

I think that changing error numbers from historical practice, especially
in areas where applications are likely to depend on them (and I suspect
some applications depend on getting ENODEV when they try to open an empty
tape drive) is a bad idea, though.

Ben Harris                                                   <>
Portmaster, NetBSD/acorn26           <URL:>