This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Newbee problem at compile mtx scsi changer tool


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/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]