Search
lxdream.org :: lxdream/src/drivers/cdrom/cd_nrg.c :: diff
lxdream 0.9.1
released Jun 29
Download Now
filename src/drivers/cdrom/cd_nrg.c
changeset 1298:d0eb2307b847
prev1178:e55ec927d55d
author nkeynes
date Wed Feb 04 08:38:23 2015 +1000 (5 years ago)
permissions -rw-r--r--
last change Fix assorted compile warnings reported by Clang
file annotate diff log raw
1.1 --- a/src/drivers/cdrom/cd_nrg.c Sat Sep 17 22:39:36 2011 +1000
1.2 +++ b/src/drivers/cdrom/cd_nrg.c Wed Feb 04 08:38:23 2015 +1000
1.3 @@ -133,7 +133,7 @@
1.4 case 3: return SECTOR_SEMIRAW_MODE2;
1.5 case 7: return SECTOR_CDDA;
1.6 case 16: return SECTOR_CDDA_SUBCHANNEL;
1.7 - default: return -1;
1.8 + default: return SECTOR_UNKNOWN;
1.9 }
1.10 }
1.11
1.12 @@ -233,7 +233,7 @@
1.13 for( i=0; i<count; i++ ) {
1.14 uint32_t offset = GUINT32_FROM_BE(dao->track[i].offset);
1.15 sector_mode_t mode = nrg_track_mode( dao->track[i].mode );
1.16 - if( mode == -1 ) {
1.17 + if( mode == SECTOR_UNKNOWN ) {
1.18 RETURN_PARSE_ERROR("Unknown track mode in NRG image file (%d)", dao->track[i].mode);
1.19 }
1.20 if( CDROM_SECTOR_SIZE(mode) != GUINT32_FROM_BE(dao->track[i].sector_size) ) {
1.21 @@ -259,7 +259,7 @@
1.22 for( i=0; i<count; i++ ) {
1.23 uint32_t offset = (uint32_t)GUINT64_FROM_BE(daox->track[i].offset);
1.24 sector_mode_t mode = nrg_track_mode( daox->track[i].mode );
1.25 - if( mode == -1 ) {
1.26 + if( mode == SECTOR_UNKNOWN ) {
1.27 RETURN_PARSE_ERROR("Unknown track mode in NRG image file (%d)", daox->track[i].mode);
1.28 }
1.29 if( CDROM_SECTOR_SIZE(mode) != GUINT32_FROM_BE(daox->track[i].sector_size) ) {
1.30 @@ -287,7 +287,7 @@
1.31 for( i=0; i < count; i++, etnf++ ) {
1.32 uint32_t offset = GUINT32_FROM_BE(etnf->offset);
1.33 sector_mode_t mode = nrg_track_mode( GUINT32_FROM_BE(etnf->mode) );
1.34 - if( mode == -1 ) {
1.35 + if( mode == SECTOR_UNKNOWN ) {
1.36 RETURN_PARSE_ERROR("Unknown track mode in NRG image file (%d)", etnf->mode);
1.37 }
1.38 cdrom_count_t sector_count = GUINT32_FROM_BE(etnf->length) /
1.39 @@ -308,7 +308,7 @@
1.40 for( i=0; i < count; i++, etn2++ ) {
1.41 uint32_t offset = (uint32_t)GUINT64_FROM_BE(etn2->offset);
1.42 sector_mode_t mode = nrg_track_mode( GUINT32_FROM_BE(etn2->mode) );
1.43 - if( mode == -1 ) {
1.44 + if( mode == SECTOR_UNKNOWN ) {
1.45 RETURN_PARSE_ERROR("Unknown track mode in NRG image file (%d)", etn2->mode);
1.46 }
1.47 cdrom_count_t sector_count = (uint32_t)(GUINT64_FROM_BE(etn2->length) /
.