delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2007/01/03/05:25:43

X-Spam-Check-By: sourceware.org
Date: Wed, 3 Jan 2007 11:25:26 +0100
From: Corinna Vinschen <corinna-cygwin AT cygwin DOT com>
To: cygwin AT cygwin DOT com
Subject: Re: Newbee problem at compile mtx scsi changer tool
Message-ID: <20070103102526.GA11943@calimero.vinschen.de>
Reply-To: cygwin AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
References: <emreg3$ns3$1 AT sea DOT gmane DOT org> <4591B29F DOT BEA9C839 AT dessent DOT net> <en5uc8$9op$1 AT sea DOT gmane DOT org>
Mime-Version: 1.0
In-Reply-To: <en5uc8$9op$1@sea.gmane.org>
User-Agent: Mutt/1.4.2.2i
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT cygwin DOT com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com

On Dec 30 15:50, Pierre Bernhardt wrote:
> So my next question: How can I code the scsi devices?
> With vmware I have seen, that I must map my windows tape0 device to
> vmware scsi:0:0 and my scsi:4:1 (the loader on id1, tape has normally
> id0) is mapped to scsi:4:1, so under linux in vmware the tape is
> accessible as sg0/nst0 and the loader is accessible as sg1.
> The situation with my 4 CD-Rom jukebox is nearly the same:
> 
> The loader is scsi:4:2 mapped to scsi:0:2 and the cdrom mapping is
> cdrom0 --> scsi:4:3, cdrom1 --> scsi:4:4, cdrom2 ...
> 
> But now back to my question: It looks like that in Windows an node
> scsi:4:1 scsi:4:2 could be found so I think unter cygwin the devices
> could be accessed, too.
> In my opinion so the scsi-code could be convert to cygwin, with more or
> less problems.
> So my question is now how can I acces the scsi devices?

What you want is direct SCSI access which is only available through
native Windows calls.  You have to figure out the name of your loader
in the Win32 or native NT namespace and open the device with CreateFile
or NtOpenFile.  Then you can either use the IOCTL_CHANGER_* class of
DeviceIoControl codes, as far as they match what you're looking for,
or you can use the IOCTL_SCSI_PASS_THROUGH DeviceIoControl code for
direct SCSI device access.  Whatever you do, you have to use native
Windows/NT function calls since generic scsi devices (sgX) are not
provided by Cygwin.


Corinna

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

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019