Hi,
I need to be able to open a device using the POSIX reference in Cygwin
and issue IOCTL calls to it.  SCSI commands specifically.

The following is some code:

struct sg_io_hdr  io_hdr;

   int fd = open("/dev/sdc", O_RDWR); 
  
  ret = ioctl(fd, SG_IO, &io_hdr);


I put in my own sg_io_hdr in the file which I copied from the sg.h.

I had return code = -1 which is error.

Could someone please give me some ideas about how to do this right.
Thanks.

Lihong

--
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/

Reply via email to