New option -early_drive_test

This commit is contained in:
2011-03-21 09:37:02 +00:00
parent 37789c3f71
commit 393ad85438
13 changed files with 170 additions and 65 deletions

View File

@ -1757,20 +1757,29 @@ int Xorriso_burn_track(struct XorrisO *xorriso, off_t write_start_address,
if(isoburn_needs_emulation(drive)) {
if(flag&1) {
ret= isoburn_disc_track_lba_nwa(drive, burn_options, 0, &dummy, &nwa);
Xorriso_process_msg_queues(xorriso,0);
if(ret<=0) {
Xorriso_process_msg_queues(xorriso,0);
sprintf(xorriso->info_text,
"Cannot obtain next writeable address of emulated multi-session media\n");
Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "FAILURE", 0);
ret= 0; goto ex;
}
if(nwa==32)
if(nwa == 32 && disc_state != BURN_DISC_APPENDABLE)
nwa= 0; /* No automatic toc emulation. Formatter might not be aware. */
burn_write_opts_set_start_byte(burn_options,((off_t) nwa) * (off_t) 2048);
} else {
nwa= 0;
burn_write_opts_set_start_byte(burn_options, (off_t) 0);
if (disc_state == BURN_DISC_APPENDABLE) {
ret= isoburn_disc_track_lba_nwa(drive, burn_options, 0, &dummy, &nwa);
Xorriso_process_msg_queues(xorriso,0);
if(ret<=0) {
sprintf(xorriso->info_text,
"Cannot obtain next writeable address of emulated appendable media\n");
Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "FAILURE", 0);
ret= 0; goto ex;
}
}
}
burn_write_opts_set_start_byte(burn_options,((off_t) nwa) * (off_t) 2048);
}
if(write_start_address>=0) {
@ -2232,8 +2241,11 @@ int Xorriso_update_iso_lba0(struct XorrisO *xorriso, int iso_lba, int isosize,
}
if(iso_lba < 32)
return(2);
if(!(flag & 2)) {
/* head_buffer was not filled yet. Read it from output media. */
if(burn_drive_get_drive_role(drive) == 5) /* write-only */
return(2);
if(job != NULL && job->data_to_fd >= 0) {
if((flag & 8) && job->sector_map != NULL) {
ret= Sectorbitmap_bytes_are_set(job->sector_map,