Actually you hit on the problem with using mt. Before you can do an ioctl() you have to open() the tape, but before you can open() the tape you have to allocate it. I don't see how you can use ioctl() to allocate the tape.
Perhaps I know too much about how drivers work to see this the way the user would like this to work. -----Original Message----- From: David Boyes [mailto:[EMAIL PROTECTED] Sent: Thursday, June 12, 2003 5:40 PM To: [EMAIL PROTECTED] Subject: Re: Linux390 + VM + Tape 3490 On Thu, Jun 12, 2003 at 05:31:39PM -0700, Fargusson.Alan wrote: > The mt command is designed to control a tape drive. An allocate > command would be used to gain access to a tape drive, and prevent > others from using it. Perhaps this seems like a fine point, but I > prefer to separate the functionality. I guess I'm puzzled about what the distinction is. Allocation (IMHO) seems to be a tape control function -- it's clearly discrete from reading and writing the data on the tape, and 'mt' contains every other function that is not directly related to reading and writing the tape. All mt does is execute ioctl's to control tape function, just like the TSO ALLOCATE command performs the standard allocation functions driven by a chunk of command line code. How is this any different?