hreinecke / sg3_utils

Deprecated git-svn mirror for sg3_utils
http://sg.danny.cz/sg/sg3_utils.html
Other
155 stars 91 forks source link

macOS Build? #94

Open mbparker opened 1 year ago

mbparker commented 1 year ago

Not a bug - just a question...

I'm presuming not, but is it possible to build and use this on macOS?

Use case: I need to send a SCSI INQUIRY command to old style (non-iOS) iPod devices on Windows, Linux, and macOS. I've got Windows and Linux covered. Finding hardly anything at all on how to do this on macOS.

doug-gilbert commented 1 year ago

Most OSes have a SCSI (and now NVMe) pass-through at the upper level (inside the kernel). So there is only one of them and it will be present if the SCSI (ATA or NVME) subsystem is loaded in the kernel. IMO this is a reasonable target to program user space tools such as sg3_utils against. My understanding is that macOS doesn't have a SCSI pass-through at an "upper level". Instead it allows hardware specific drivers (what are called "low level drivers" (LLDs) in Linux) to implement their own pass-through. While that might be of interest to hardware manufacturers making adapters to go in Apple equipment, to someone like me making user space tools that are trying to be OS, adapter and SCSI device agnostic, it is an unattractive proposition. If the situation has changed, that is: macOS has added a generic SCSI pass-through, then I might reconsider. Just checked smartmontools which has support for 'os_darwin' but inside os_darwin.cpp it says: "scsi devices are not supported [yet]" :-(