Made -check_media process first 32 blocks of a multi-session overwriteable

This commit is contained in:
Thomas Schmitt 2008-08-20 18:18:58 +00:00
parent bc0b2ccb42
commit 01ee0d659f
2 changed files with 17 additions and 2 deletions

View File

@ -1 +1 @@
#define Xorriso_timestamP "2008.08.20.121008"
#define Xorriso_timestamP "2008.08.20.181734"

View File

@ -4160,7 +4160,7 @@ int Xorriso__node_lba_cmp(const void *node1, const void *node2)
lba1= 0;
ret = iso_node_get_old_image_lba(*((IsoNode **) node2), &lba2, 0);
if(ret!=1)
lba1= 0;
lba2= 0;
return(lba1-lba2);
}
@ -7010,6 +7010,7 @@ int Xorriso_check_media(struct XorrisO *xorriso, struct SpotlisT **spotlist,
struct isoburn_toc_track **iso_burn_tracks;
struct burn_toc_entry isoburn_entry;
struct stat stbuf;
struct burn_multi_caps *caps= NULL;
*spotlist= NULL;
@ -7086,6 +7087,18 @@ int Xorriso_check_media(struct XorrisO *xorriso, struct SpotlisT **spotlist,
continue;
track_lba= isoburn_entry.start_lba;
track_blocks= isoburn_entry.track_blocks;
if(i == 0 && j == 0) {
if(track_lba == 32) {
ret= burn_disc_get_multi_caps(drive, BURN_WRITE_NONE, &caps, 0);
if(ret > 0) {
if(caps->start_adr) {
/* block 0 to 31 are the overall mount entry of overwriteable */
track_lba= 0;
track_blocks+= 32;
}
}
}
}
if(last_track_end >= 0 && last_track_end < track_lba &&
last_track_end >= start_lba) {
ret= Spotlist_add_item(*spotlist, last_track_end,
@ -7171,5 +7184,7 @@ ex:;
free(toc_info);
if(ret <= 0)
Spotlist_destroy(spotlist, 0);
if(caps!=NULL)
burn_disc_free_multi_caps(&caps);
return(ret);
}