Alexandre Goujon ale.goujon@gmail.com writes:
As part of their copy protection, some games use some ioctl's to check some physical attributes. Unfortunately, when using the loop device, some ioctl fail (like IOCTL_SCSI_GET_ADDRESS). A simple fix is to use /path/to/the/file.ISO instead of /dev/loopX.
Several places depend on this being a device. Besides, failing to get the SCSI address of a loop mount seems like correct behavior to me.
On 08/21/2012 11:49 AM, Alexandre Julliard wrote:
Alexandre Goujon ale.goujon@gmail.com writes:
As part of their copy protection, some games use some ioctl's to check some physical attributes. Unfortunately, when using the loop device, some ioctl fail (like IOCTL_SCSI_GET_ADDRESS). A simple fix is to use /path/to/the/file.ISO instead of /dev/loopX.
Several places depend on this being a device. Besides, failing to get the SCSI address of a loop mount seems like correct behavior to me.
I originally wanted this patch in because my game was failing when I mounted the ISO of the disc via the loop device. The game was calling GetVolumeInformation to check its serial and to do so, GetVolumeInformation has to look at some blocks at specific offsets. But seeking (SetFilePointer) and reading (ReadFile) is not the same with the handle of the loop device and the ISO file. So I had to manually change the dosdesices/X:: link to make it point from /dev/loop/X to /path/to/file.iso
Moreover, even if it is understandable that IOCTL_SCSI_GET_ADDRESS fails, others like IOCTL_DVD_READ_STRUCTURE, should return valid values, not ERROR_NOT_SUPPORTED.
I thought mounting the ISO should be the same thing than inserting the disc in the drive. But you seem to think that the current behaviour is the right one so in this case, simply ignore my patch.
On Tue, Aug 21, 2012 at 4:25 PM, GOUJON Alexandre ale.goujon@gmail.com wrote:
I thought mounting the ISO should be the same thing than inserting the disc in the drive. But you seem to think that the current behaviour is the right one so in this case, simply ignore my patch.
Try using cdemu to load that ISO into a virtual CDROM drive. There's an Ubuntu PPA for it at https://launchpad.net/~cdemu/+archive/ppa
Damjan