Search
lxdream.org :: lxdream/src/drivers/cdrom/cdrom.c :: diff
lxdream 0.9.1
released Jun 29
Download Now
filename src/drivers/cdrom/cdrom.c
changeset 1099:566cdeb157ec
prev1097:d4807997e450
next1108:305ef2082079
author nkeynes
date Wed Feb 10 18:16:19 2010 +1000 (10 years ago)
permissions -rw-r--r--
last change First draft of basic ISO9660 filesystem reader
file annotate diff log raw
1.1 --- a/src/drivers/cdrom/cdrom.c Sun Jan 31 18:35:06 2010 +1000
1.2 +++ b/src/drivers/cdrom/cdrom.c Wed Feb 10 18:16:19 2010 +1000
1.3 @@ -74,7 +74,8 @@
1.4 len += tmplen;
1.5 current += sub_count;
1.6 }
1.7 - *length = len;
1.8 + if( length != NULL )
1.9 + *length = len;
1.10 return CDROM_ERROR_OK;
1.11 }
1.12
1.13 @@ -310,6 +311,15 @@
1.14 return &disc->track[disc->track_count-1];
1.15 }
1.16
1.17 +cdrom_track_t cdrom_disc_get_last_data_track( cdrom_disc_t disc )
1.18 +{
1.19 + for( unsigned i=disc->track_count; i>0; i-- ) {
1.20 + if( disc->track[i-1].flags & TRACK_FLAG_DATA ) {
1.21 + return &disc->track[i-1];
1.22 + }
1.23 + }
1.24 + return NULL;
1.25 +}
1.26 cdrom_track_t cdrom_disc_prev_track( cdrom_disc_t disc, cdrom_track_t track )
1.27 {
1.28 if( track->trackno <= 1 )
1.29 @@ -383,4 +393,3 @@
1.30 {
1.31 cdrom_disc_print_toc( stderr, disc );
1.32 }
1.33 -
.