Excuse me, but why is this needed again? What IOCTL is missing in Mac OS X's native implementation? On Apr 27, 2010, at 2:10 PM, Charles Davis wrote:
> Hi, > > A while ago on this list, I was talking about implementing SCSI support > on Mac OS X in Wine, and we all agreed the best way to do that would be > to have a custom driver that provides an IOCTL interface. > > I've attached the driver (which is now finished) here. I've tested it on > my system, and it works with this small test program that's also > attached. But I want to make sure it's totally stable before I start > working on the Wine side. So if you've got a Mac, and you're feeling > brave, feel free to install my driver and run my test program. > > Extract the archive, then cd to the directory inside: > > tar jxf ExtMediaBSDClient.tar.bz2 > cd ExtMediaBSDClient > > Install the extension to /Library/Extensions: > > cp -r ExtMediaBSDClient.kext /Library/Extensions > > If you're feeling really brave, you can install it to > /System/Library/Extensions (and then it will be loaded on boot): > > cp -r ExtMediaBSDClient.kext /System/Library/Extensions > > The driver bundle has to be owned by root and belong to the wheel group, > so make sure it does before trying to load it: > > sudo chown -R root:wheel /path/to/ExtMediaBSDClient.kext > > You can load the driver with the kextload command: > > kextload /path/to/ExtMediaBSDClient.kext > > You can verify that the driver loaded by running: > > kextstat | grep "ExtMediaBSDClient" > > Once it's loaded, all SCSI disks that are inserted afterward will accept > the IOCTL. All disks that were inserted before won't however. To make > sure a disk is using my driver, run the ioreg tool (it's part of Xcode) > and look for "ExtMediaBSDClient": > > ioreg | grep "ExtMediaBSDClient" > > To test it, run the program 'ExtMediaTest' that I included. Pass it the > filename of a device file for the disk (it should be one of the raw > device files, e.g. /dev/rdisk1 instead of /dev/disk1) on which you want > to test this: > > ./ExtMediaTest /path/to/device/file > > If it works, the program will print some of the INQUIRY data for that > disk to the Terminal. If it doesn't work, it will print an error to the > Terminal (and the driver will have logged something in the kernel log; > see the Console app), or worse, the kernel will panic. (If it says > "Inappropriate ioctl for device", that probably means it's not using my > driver. Try ejecting the disk and reinserting it. And if it says the > device is busy, try the program on one of the slices, e.g. /dev/rdisk1s1 > instead of /dev/rdisk1.) > > If anything goes wrong (error messages, kernel panics, etc.), I want to > know about it. If you get an error, paste the whole error message. If > it's from ExtMediaTest, show me the lines in the kernel log that came > from the driver (they have "ExtMediaBSDClient" or some such in them). If > the kernel panics, attach the panic log. Also, tell me which version of > Mac OS X you're using (so I know which KernelDebugKit to use). > > As soon as I verify that the driver works well, I'm going to start > submitting patches to implement support for it in Wine. > > Chip > <ExtMediaBSDClient.tar.bz2>