[Search for users] [Overall Top Noters] [List of all Conferences] [Download this site]

Conference turris::digital_unix

Title:DIGITAL UNIX(FORMERLY KNOWN AS DEC OSF/1)
Notice:Welcome to the Digital UNIX Conference
Moderator:SMURF::DENHAM
Created:Thu Mar 16 1995
Last Modified:Fri Jun 06 1997
Last Successful Update:Fri Jun 06 1997
Number of topics:10068
Total number of notes:35879

1569.0. "How to read volume lable of an ISo-9660 cdrom?" by RHETT::MOORE () Fri Jul 07 1995 17:33

T.RTitleUserPersonal
Name
DateLines
1569.1Something like this, I think.NABETH::alanDr. File System's Home for Wayward Inodes.Fri Jul 07 1995 19:2796
1569.2thanks!RHETT::MOOREMon Jul 10 1995 13:511
1569.3How about reading raw tracks?DECWET::LOWEBruce Lowe, DECwest Eng., DTN 548-8910Tue May 27 1997 19:0334
Question about reading directly from a CDROM device file:

I am trying to read a track (on a multi-track CD, like a Photo CD (as 
opposed to multi-session, since that is yet a different problem)) into a 
raw data file.

I have successfully (apparently) used the CDROM_TOC_HEADER and
CDROM_TOC_ENTRYS ioctl calls to read in the TOC, and having parsed the TOC
data, the track directory looks consistent with the track listing from the
same CD given by a WinNT-based CD-Write software package. I am calculating
the lseek target for the track(s) from the LBA data, and I start a read loop.

The problem occurs when I hit the end of the track, trying to read the last
frame. The read hangs, apparently out of control of my program, and 
eventually returns an EIO in errno. This can take a couple of minutes. 
O_NONBLOCK and O_NDELAY have no effect. It hangs *before* I get a chance to 
examine the n_chars returned by read().

Is there a way to:

1) know when to stop reading - the start lba is in the TOC, but the length
   of the track apparently isn't. Is it calculated from the start of the
   subsequent track? This issue isn't really the first problem, since I am
   hanging *during* the last frame, not after, although I understand that 
   read() will return an error if you attempt to read the space between
   tracks.

2) gain control of the read() call during this time when it is hung - what
   is going on here? Is it that the driver is just trying very hard before
   giving up?
   
I hope I am not posting a redundant note here. I looked thru the conference,
and 1569.1 was the closet thing I found.