public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
From: Corinna Vinschen <corinna-cygwin@cygwin.com>
To: cygwin@cygwin.com
Subject: Re: mt LTO 6 Unknown type of tape device AND online status not correct
Date: Mon, 25 Jun 2018 12:08:00 -0000	[thread overview]
Message-ID: <20180625092926.GE28757@calimero.vinschen.de> (raw)
In-Reply-To: <5B2CECB2.3080101@diotec.com>

[-- Attachment #1: Type: text/plain, Size: 1515 bytes --]

On Jun 22 14:33, Timo Maier wrote:
> Hello,
> 
> the following is done with: mt V2.5.2, Corinna Vinschen, Aug 26 2013
> 
> I have a Quantum LTO 6 Tape Drive (QUANTUM_ULTRIUM-HH6) which works in general with the latest cygwin64. I can use mt to rewind or eject and tar can write and read the tape.
> 
> Before starting to write I want to check if the tape is ready with "status", but no matter if the tape is in or not, status always says ONLINE.
> 
> Can anyone help, please? Thanks in advance.

The ONLINE status is a result of the following (pseudo) Windows calls:

  offline = false;
  if (GetTapeStatus (tape_handle) == ERROR_NO_MEDIA_IN_DRIVE
      || GetTapeParameters (tape_handle, GET_TAPE_MEDIA_INFORMATION, ...)
	 == ERROR_NO_MEDIA_IN_DRIVE)
    offline = true;

The actual code also ignores ERROR_MEDIA_CHANGED errors, but it does
*not* ignore ERROR_BUS_RESET.  Assuming the drive doesn't screw up
completely, maybe an ERROR_BUS_RESET is generated.  However, this
should have been catched by the GetTapeStatus call so the subsequent
GetTapeParameters call should return a sane error code.  Hmm.

If I give you the URL to a special Cygwin DLL just for testing this
situation via PM, are you willing to run it so we may find the cause of
this discrepancy?  No guarantee this can be fixed, but we can at least
try.


Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Maintainer                 cygwin AT cygwin DOT com
Red Hat

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

  reply	other threads:[~2018-06-25  9:29 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-06-22 17:47 Timo Maier
2018-06-25 12:08 ` Corinna Vinschen [this message]
2018-06-28 18:04   ` Timo Maier
2018-06-29 22:48     ` Corinna Vinschen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180625092926.GE28757@calimero.vinschen.de \
    --to=corinna-cygwin@cygwin.com \
    --cc=cygwin@cygwin.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).