- IOObjectRelease( service );
-
- return( pTOC );
-}
-
-/****************************************************************************
- * darwin_getNumberOfDescriptors: get number of descriptors in TOC
- ****************************************************************************/
-static int darwin_getNumberOfDescriptors( CDTOC *pTOC )
-{
- int i_descriptors;
-
- /* get TOC length */
- i_descriptors = pTOC->length;
-
- /* remove the first and last session */
- i_descriptors -= ( sizeof(pTOC->sessionFirst) +
- sizeof(pTOC->sessionLast) );
-
- /* divide the length by the size of a single descriptor */
- i_descriptors /= sizeof(CDTOCDescriptor);