patch-2.3.11 linux/drivers/block/ide-cd.c
Next file: linux/drivers/block/ide-pmac.c
Previous file: linux/arch/ppc/mm/init.c
Back to the patch index
Back to the overall index
- Lines: 31
- Date:
Thu Jul 15 13:55:24 1999
- Orig file:
v2.3.10/linux/drivers/block/ide-cd.c
- Orig date:
Fri May 28 09:34:41 1999
diff -u --recursive --new-file v2.3.10/linux/drivers/block/ide-cd.c linux/drivers/block/ide-cd.c
@@ -2124,20 +2124,23 @@
msf.cdmsf_frame0);
/* Make sure the TOC is up to date. */
- stat = cdrom_read_toc (drive, NULL);
- if (stat) return stat;
+ if (cmd != CDROMREADRAW) {
+ stat = cdrom_read_toc (drive, NULL);
+ if (stat)
+ return stat;
- toc = info->toc;
+ toc = info->toc;
- if (lba < 0 || lba >= toc->capacity)
- return -EINVAL;
+ if (lba < 0 || lba >= toc->capacity)
+ return -EINVAL;
+ }
buf = (char *) kmalloc (blocksize, GFP_KERNEL);
if (buf == NULL)
return -ENOMEM;
- stat = cdrom_read_block (drive, format, lba, 1, buf, blocksize,
- NULL);
+ stat = cdrom_read_block (drive, format, lba, 1, buf,
+ blocksize, NULL);
if (stat == 0) {
if (cmd == CDROMREADMODE2) {
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)