|
|
|
@ -283,7 +283,7 @@ int Xorriso_auto_format(struct XorrisO *xorriso, int flag)
|
|
|
|
|
ret= burn_disc_get_formats(drive, &status, &size, &dummy, &num_formats);
|
|
|
|
|
if(ret>0 && status==BURN_FORMAT_IS_UNFORMATTED) {
|
|
|
|
|
sprintf(xorriso->info_text,
|
|
|
|
|
"Unformatted %s media detected. Trying -format fast.",
|
|
|
|
|
"Unformatted %s medium detected. Trying -format fast.",
|
|
|
|
|
profile_name);
|
|
|
|
|
Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "NOTE", 0);
|
|
|
|
|
ret= Xorriso_format_media(xorriso, (off_t) 0, 1 | 4);
|
|
|
|
@ -1029,7 +1029,7 @@ fprintf(stderr, "XORRISO_DEBUG: isoburn_igopt_set_tail_blocks(%d)\n",
|
|
|
|
|
burn_track_get_counters(tracks[0],&readcounter,&writecounter);
|
|
|
|
|
xorriso->session_blocks= (int) (writecounter/ (off_t) 2048);
|
|
|
|
|
sprintf(xorriso->info_text,
|
|
|
|
|
"ISO image produced: %d sectors\nWritten to media : %d sectors at LBA %d\n",
|
|
|
|
|
"ISO image produced: %d sectors\nWritten to medium : %d sectors at LBA %d\n",
|
|
|
|
|
(int) (readcounter/ (off_t) 2048),
|
|
|
|
|
xorriso->session_blocks, xorriso->session_lba);
|
|
|
|
|
Xorriso_info(xorriso, 0);
|
|
|
|
@ -1320,8 +1320,8 @@ int Xorriso_pacifier_loop(struct XorrisO *xorriso, struct burn_drive *drive,
|
|
|
|
|
/* @param flag bit0= fast
|
|
|
|
|
bit1= deformat
|
|
|
|
|
bit2= do not re-aquire drive
|
|
|
|
|
@return 0=failure, did not touch media , -1=failure, altered media
|
|
|
|
|
1=success, altered media , 2=success, did not touch media
|
|
|
|
|
@return 0=failure, did not touch medium , -1=failure, altered medium
|
|
|
|
|
1=success, altered medium , 2=success, did not touch medium
|
|
|
|
|
*/
|
|
|
|
|
int Xorriso_blank_media(struct XorrisO *xorriso, int flag)
|
|
|
|
|
{
|
|
|
|
@ -1366,7 +1366,7 @@ int Xorriso_blank_media(struct XorrisO *xorriso, int flag)
|
|
|
|
|
if(disc_state == BURN_DISC_BLANK) {
|
|
|
|
|
if(!do_deformat) {
|
|
|
|
|
sprintf(xorriso->info_text,
|
|
|
|
|
"Blank media detected. Will leave it untouched");
|
|
|
|
|
"Blank medium detected. Will leave it untouched");
|
|
|
|
|
Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "NOTE", 0);
|
|
|
|
|
return 2;
|
|
|
|
|
}
|
|
|
|
@ -1388,12 +1388,12 @@ int Xorriso_blank_media(struct XorrisO *xorriso, int flag)
|
|
|
|
|
}
|
|
|
|
|
if(xorriso->do_dummy) {
|
|
|
|
|
sprintf(xorriso->info_text,
|
|
|
|
|
"-dummy mode prevents blanking of media in mode '%s'.",
|
|
|
|
|
"-dummy mode prevents blanking of medium in mode '%s'.",
|
|
|
|
|
mode_names[flag&3]);
|
|
|
|
|
Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "NOTE", 0);
|
|
|
|
|
return(1);
|
|
|
|
|
}
|
|
|
|
|
sprintf(xorriso->info_text, "Beginning to blank media in mode '%s'.\n",
|
|
|
|
|
sprintf(xorriso->info_text, "Beginning to blank medium in mode '%s'.\n",
|
|
|
|
|
mode_names[flag&3]);
|
|
|
|
|
Xorriso_info(xorriso,0);
|
|
|
|
|
|
|
|
|
@ -1445,8 +1445,8 @@ int Xorriso_blank_media(struct XorrisO *xorriso, int flag)
|
|
|
|
|
bit2= do not re-aquire drive
|
|
|
|
|
bit7= by_index mode:
|
|
|
|
|
bit8 to bit15 contain the index of the format to use.
|
|
|
|
|
@return 0=failure, did not touch media , -1=failure, altered media
|
|
|
|
|
1=success, altered media , 2=success, did not touch media
|
|
|
|
|
@return 0=failure, did not touch medium , -1=failure, altered medium
|
|
|
|
|
1=success, altered medium , 2=success, did not touch medium
|
|
|
|
|
*/
|
|
|
|
|
int Xorriso_format_media(struct XorrisO *xorriso, off_t in_size, int flag)
|
|
|
|
|
{
|
|
|
|
@ -1551,11 +1551,11 @@ int Xorriso_format_media(struct XorrisO *xorriso, off_t in_size, int flag)
|
|
|
|
|
mode_flag|= 16; /* enable re-formatting */
|
|
|
|
|
|
|
|
|
|
if(xorriso->do_dummy) {
|
|
|
|
|
sprintf(xorriso->info_text, "-dummy mode prevents formatting of media.");
|
|
|
|
|
sprintf(xorriso->info_text, "-dummy mode prevents formatting of medium.");
|
|
|
|
|
Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "NOTE", 0);
|
|
|
|
|
return(1);
|
|
|
|
|
}
|
|
|
|
|
sprintf(xorriso->info_text, "Beginning to format media.\n");
|
|
|
|
|
sprintf(xorriso->info_text, "Beginning to format medium.\n");
|
|
|
|
|
Xorriso_info(xorriso, 0);
|
|
|
|
|
if(flag & 2)
|
|
|
|
|
size= in_size;
|
|
|
|
@ -1613,8 +1613,8 @@ int Xorriso_format_media(struct XorrisO *xorriso, off_t in_size, int flag)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/* @param flag bit2= formatting rather than blanking
|
|
|
|
|
@return 0=failure, did not touch media , -1=failure, altered media
|
|
|
|
|
1=success, altered media , 2=success, did not touch media
|
|
|
|
|
@return 0=failure, did not touch medium , -1=failure, altered medium
|
|
|
|
|
1=success, altered medium , 2=success, did not touch medium
|
|
|
|
|
*/
|
|
|
|
|
int Xorriso_blank_as_needed(struct XorrisO *xorriso, int flag)
|
|
|
|
|
{
|
|
|
|
@ -1832,7 +1832,7 @@ int Xorriso_burn_track(struct XorrisO *xorriso, off_t write_start_address,
|
|
|
|
|
Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "FAILURE", 0);
|
|
|
|
|
ret= 0; goto ex;
|
|
|
|
|
}
|
|
|
|
|
/* read isosize from head_buffer, not from media*/
|
|
|
|
|
/* read isosize from head_buffer, not from medium */
|
|
|
|
|
ret= isoburn_read_iso_head(drive, 0, &isosize, head_buffer, (1<<13));
|
|
|
|
|
if(ret<=0) {
|
|
|
|
|
Xorriso_process_msg_queues(xorriso,0);
|
|
|
|
|