home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.sys.sgi
- Path: sparky!uunet!charon.amdahl.com!pacbell.com!decwrl!sun-barr!ames!sgi!fido!zola!zuni!anchor!olson
- From: olson@anchor.esd.sgi.com (Dave Olson)
- Subject: Re: MTIOCTOP w/ MT_NOP does not update mt_dsposn, shouldn't it???
- Message-ID: <s0lhhh8@zuni.esd.sgi.com>
- Sender: news@zuni.esd.sgi.com (Net News)
- Organization: Silicon Graphics, Inc. Mountain View, CA
- References: <fish.720998046@news2.gsfc.nasa.gov>
- Date: Fri, 6 Nov 92 03:26:26 GMT
- Lines: 46
-
- In <fish.720998046@news2.gsfc.nasa.gov> fish@daacdev1.stx.com writes:
- | this is w/ irix 4.0.1 on a 4D/440S using jaguar controllers to a 8mm
- |
- | i am trying to loop until i can detect a tape is loaded in a drive
- | via MTIOCGET using the mt_dposn MT_ONL bit - that works fine if there
- | is a tape in the drive before i do the open but if it gets put in later
- | (which is really the whole point of what i'm trying to do)
- | i then issue another ioctl GET to ascertain if its status has changed.
- | since that wasn't working i saw that the CTOP MT_NOP option states that
- | it does "no operation, sets status only" - so i stuck that in there
- | and that didn't do anything either - what does it do?? only update
- | the mt_dsreg element and not the mt_dposn element?
-
- MT_NOP is just that, a no op. It is *completely* ignored (in all of
- our tape drivers). All it tells you is that you are in fact talking
- to a tape driver, rather than some other kind of device (if you don't
- get an error).
-
- MTIOCGET just returns the current info, it does nothing to the
- tape drive for the jagtape driver. I had enough complaints about
- this and similar things, that for the tpsc driver, if the tape
- wasn't loaded, I loaded it, which updated all the position info.
-
- In a future release, there will be only one scsi tape driver (talking
- to multiple chip drivers), so they will be consistent. In this case,
- it will follow the tpsc model.
-
- | i had to resort to reopening the file every time i check in the loop
- | (by closing and then opening again) and this works (but has the
- | unfortunate side-effect of having the jag driver repeatedly log
- | "BUSY, waiting" while the tape is loading and the open() is pending
- |
- | i haven't tried this with the tpsc driver yet but i'll need to soon
-
- The tpsc driver will load the tape on the MTIOCGET, if it wasn't already
- loaded. The jag drives also tend to be a bit more verbose about
- issuing messages.
-
- A *very quick* (and therefore possibly wrong) inspection of the jagtape
- driver makes it appear to me that the only way to do what you want with
- the jagtape driver is to do exactly what you are doing, close, and then
- re-open the drive.
- --
- Let no one tell me that silence gives consent, | Dave Olson
- because whoever is silent dissents. | Silicon Graphics, Inc.
- Maria Isabel Barreno | olson@sgi.com
-