http://bugs.winehq.org/show_bug.cgi?id=29669
Charles Davis cdavis@mymail.mines.edu changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |cdavis@mymail.mines.edu
--- Comment #16 from Charles Davis cdavis@mymail.mines.edu 2012-02-10 15:54:08 CST --- (In reply to comment #14)
Created attachment 38727 [details] Updated draft patch, forces same Length as seen on Windows, fixes -Wall. Needs macosx testing.
Patch doesn't even compile :). When you got rid of the 'ret' variable in the Mac OS path, you didn't change the call to ioctl(2) not to use it.
After fixing that little detail, I found I couldn't run the test program as-is because Mac OS only gives read-only access (i.e. the device file has mode 0440) to read-only media. And after fixing *that*, the test program failed miserably--probably due to terrible mistakes I made when I first implemented this for Mac. For one thing, I forgot to memset(3) dvdrs to 0. (Those pesky reserved fields have to be zero or the driver will reject them outright! And I should know, because my own driver rejects DKIOCSCSICOMMAND if any of the reserved fields are nonzero!) After fixing NTDLL and my custom SCSI driver not to reject the massive sense buffer you handed them (kSenseInfoDefaultSize is only 18 bytes on Mac OS), I'm down to one failure, which turns out has to do with the OSReadBigInt32() calls I made in my original patch. With that fixed, the tests finally pass. I will send my changes soon.
Regarding the buffer sizes: I know that MMC-5 says that most of the buffers are supposed to be 2048 bytes; I'm not sure where the extra two bytes come from.