Usenet comp.unix.osf.osf1 (1992-2004)
 help / color / mirror / Atom feed
* Mag tape takes 40 secs to show no tape in drive
@ 2000-03-15  5:00 Gerald Heinig
  0 siblings, 0 replies; only message in thread
From: Gerald Heinig @ 2000-03-15  5:00 UTC (permalink / raw)


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 518 bytes --]

Hi all,

When I open a magnetic tape device (/dev/nrmt0a) and do an
ioctl(MT_ONLINE,...) it takes 40 seconds to realise that there isn�t
a tape in the drive. The code looks like this:

 int fd = ::open( "/dev/nrmt0a", O_RDWR );
 if( fd < 0 )
  return false;

 struct mtop tapeOp;
 tapeOp.mt_op    = MTONLINE;
 tapeOp.mt_count = 1;

 int nRet = ioctl( fd, MTIOCTOP, &tapeOp );
 close( fd );

 return nRet >= 0;

Anyone have any ideas as to why it takes so long, or as to what I�m doing
wrong?

Cheers,

Gerald






^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2000-03-15  5:00 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2000-03-15  5:00 Mag tape takes 40 secs to show no tape in drive Gerald Heinig

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox