patch-2.0.11 linux/drivers/scsi/sr.c
Next file: linux/drivers/scsi/st.c
Previous file: linux/drivers/scsi/sg.c
Back to the patch index
Back to the overall index
- Lines: 23
- Date:
Thu Aug 1 15:43:03 1996
- Orig file:
v2.0.10/linux/drivers/scsi/sr.c
- Orig date:
Thu Jul 18 14:28:48 1996
diff -u --recursive --new-file v2.0.10/linux/drivers/scsi/sr.c linux/drivers/scsi/sr.c
@@ -485,11 +485,11 @@
printk(KERN_WARNING"sr_photocd: ioctl error (TOSHIBA #1): 0x%x\n",rc);
break; /* if the first ioctl fails, we don't call the second one */
}
- is_xa = (rec[0] == 0x20);
min = (unsigned long) rec[1]/16*10 + (unsigned long) rec[1]%16;
sec = (unsigned long) rec[2]/16*10 + (unsigned long) rec[2]%16;
frame = (unsigned long) rec[3]/16*10 + (unsigned long) rec[3]%16;
sector = min*CD_SECS*CD_FRAMES + sec*CD_FRAMES + frame;
+ is_xa = (rec[0] == 0x20) || sector;
if (sector) {
sector -= CD_BLOCK_OFFSET;
#ifdef DEBUG
@@ -566,6 +566,9 @@
break;
}
sector = rec[11] + (rec[10] << 8) + (rec[9] << 16) + (rec[8] << 24);
+ if (rec[6] <= 1) {
+ sector = 0; /* ignore sector offsets from first track */
+ }
is_xa = !!sector;
#ifdef DEBUG
if (sector)
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov