This is the mail archive of the
mailing list for the Cygwin project.
Re: Newbee problem at compile mtx scsi changer tool
- From: Corinna Vinschen <corinna-cygwin at cygwin dot com>
- To: cygwin at cygwin dot com
- Date: Wed, 3 Jan 2007 11:25:26 +0100
- Subject: Re: Newbee problem at compile mtx scsi changer tool
- References: <firstname.lastname@example.org> <4591B29F.BEA9C839@dessent.net> <email@example.com>
- Reply-to: 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 Vinschen Please, send mails regarding Cygwin to
Cygwin Project Co-Leader cygwin AT cygwin DOT com
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html