Can anybody help me with finding a replacement for this patch
destined for 2.1's sr_ioctl() in 2.0.30. Hard stuff is sr_read_sector()
replacement.
This patch is from readvcd-2.3. Or is there this patch for 2.0?
-- cut here --
case CDROMREADRAW:
case CDROMREADMODE2:
case CDROMREADMODE1:
{
unsigned char *raw;
struct cdrom_msf msf;
int blocksize, lba, rc;
if (cmd == CDROMREADMODE1)
blocksize = CD_FRAMESIZE; /* 2048 */
else if (cmd == CDROMREADMODE2)
blocksize = CD_FRAMESIZE_RAW0; /* 2336 */
else
/* some SCSI drives do not allow this one */
blocksize = CD_FRAMESIZE_RAW; /* 2352 */
rc = verify_area (VERIFY_READ, (void *) arg, sizeof(msf));
if ( rc ) return -EFAULT;
memcpy_fromfs(&msf,(void*)arg,sizeof(msf));
if (!(raw = scsi_malloc(2048+512)))
return -ENOMEM;
lba = (((msf.cdmsf_min0 * CD_SECS) + msf.cdmsf_sec0)
* CD_FRAMES + msf.cdmsf_frame0) - CD_BLOCK_OFFSET;
rc = sr_read_sector(target, lba, blocksize, raw);
if (!rc) {
rc = verify_area (VERIFY_WRITE, raw, blocksize);
if ( rc )
rc = -EFAULT;
else
memcpy_tofs((void*)arg, raw, blocksize);
}
scsi_free(raw,2048+512);
return rc;
}
-- Best regards, -- Boris.