X-Spam-Check-By: sourceware.org Date: Wed, 3 Jan 2007 11:25:26 +0100 From: Corinna Vinschen 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: <4591B29F DOT BEA9C839 AT dessent DOT net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.2.2i Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , 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/