|
From: Joerg S. <Joe...@fo...> - 2016-01-19 10:38:42
|
Tao Wang <twa...@gm...> wrote: > We generalized the API we need, such as 'scsi_read()' and > 'scsi_write()', then, implemented those API for Linux and Windows > separately. > > Here is the implementation: > https://github.com/asalamon74/pktriggercord/blob/master/pslr_scsi_linux.c > https://github.com/asalamon74/pktriggercord/blob/master/pslr_scsi_win.c > > So, basically, we use '/sys/class/scsi_generic' with 'ioctl()' for > Linux, and 'DeviceIoControl()' with 'IOCTL_SCSI_PASS_THROUGH_DIRECT' > for Windows. For a limited usage, this may look OK but this way, you only support two platforms. If this is to support a camera, I believe there would be people on many more platforms that could be interested in support. > There are 2 driver candidates I might look into if I'm going to > implement my own OSX kernel driver. > > The first one is the blog written by Joel Reymont: > > http://wagerlabs.com/blog/2008/02/04/writing-a-mac-osx-usb-device-driver-that-implements-scsi-pass-through/ > > And here is the code for it: > > https://github.com/wagerlabs/seaforth24 > > Another one is 'OS-X-SAT-SMART-Driver' written for 'smartmontools': > > https://github.com/kasbert/OS-X-SAT-SMART-Driver Interesting, thank you! Jörg -- EMail:jo...@sc... (home) Jörg Schilling D-13353 Berlin joe...@fo... (work) Blog: http://schily.blogspot.com/ URL: http://cdrecord.org/private/ http://sourceforge.net/projects/schilytools/files/' |