CDROM doesn't report EOF.

From: Rogier Wolff (R.E.Wolff@BitWizard.nl)
Date: Tue Jul 25 2000 - 06:34:48 EST


Hi,

When I read past the end of a CDROM, I should get EOF, just like for a
harddisk right?

I have a program that will read a disk, copying each block, unless an
error is found. on error it skips to the next block until it hits the
end of the disk (EOF).

Well, I tried it this morning with a CD, and got:

kernel: ATAPI device hdb:
kernel: Error: Illegal request -- (Sense key=0x05)
kernel: Logical block address out of range -- (asc=0x21, ascq=0x00)
kernel: hdb: command error: status=0x51 { DriveReady SeekComplete Error }
kernel: hdb: command error: error=0x54
kernel: end_request: I/O error, dev 03:40 (hdb), sector 1290628

This is reported as an "error" to the application. If I'd be copying
the disk with "dd", then the dd would indeed bomb out.

But my program is specifically designed to go around bad blocks and
then continue reading the next block. I caught it this morning after
it had reported about 600000 block as "bad" (i.e. it had tried to read
1.2G off the CD...)

                        Rogier.

-- 
** R.E.Wolff@BitWizard.nl ** http://www.BitWizard.nl/ ** +31-15-2137555 **
*-- BitWizard writes Linux device drivers for any device you may have! --*
*       Common sense is the collection of                                *
******  prejudices acquired by age eighteen.   -- Albert Einstein ********

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Mon Jul 31 2000 - 21:00:18 EST