There is a problem with the definition of default tape device for recent Linux systems that are using udev for maintaining device nodes. from <sys/mtio.h> ... /* Specify default tape device. */ #ifndef DEFTAPE # define DEFTAPE "/dev/tape" #endif On recent systems /dev/tape is a directory, so every application using DEFTAPE throws an error when used without specifying explicit tape device. references: https://bugzilla.novell.com/show_bug.cgi?id=355241 https://bugzilla.redhat.com/show_bug.cgi?id=289381
adding Harald as the udev maintainer
There will never be a lasting consensus what is the "correct" default tape dirve name. On a machine with two or more identical tape drives it's even not nonsensical. I'd suggest explicitly naming the device you work with.
the /dev/tape directory is considered a quasi standard across all distributions, which use the udev standard rule files.
(In reply to comment #2) > There will never be a lasting consensus what is the "correct" default tape > dirve name. > > On a machine with two or more identical tape drives it's even not nonsensical. > > I'd suggest explicitly naming the device you work with. But we want to be consistent across different utilities that are using tapes - mt, mtx, cpio, tar, ... In the pre-udev times the /dev/tape was a symlink to first tape device found. I think there are two ways out of this 1. find a new name for default tape, let udev create it as a symlink and define it in sys/mtio.h 2. rename the /dev/tape directory in udev to something else and let udev create the /dev/tape as symlink
>But we want to be consistent across different utilities > that are using tapes - mt, mtx, cpio, tar, ... Yes. My proposal is to make them complain if tape device name is not explicitly given. By analogy, cp does not have "default target directory", just "cp /bin/sh" does not work. You have to specify where to copy the file. These utilities already have options to specify target tape device. For example, mtx [-f <scsi-generic-device>]. Just make them fail if this option is not given. Just my 0.02 euros
I'm closing this bug. In glibc I won't make a decision. Get the appropriate people to agre on a way to locate a default device and then I'll make a change.