|
|
|
@ -625,13 +625,14 @@ int Xorriso_write_session(struct XorrisO *xorriso, int flag)
|
|
|
|
|
IsoImage *image= NULL;
|
|
|
|
|
IsoNode *root_node;
|
|
|
|
|
int profile_number;
|
|
|
|
|
char *profile_name= NULL;
|
|
|
|
|
char *profile_name= NULL, *reasons= NULL;
|
|
|
|
|
IsoBoot *bootcat_node;
|
|
|
|
|
uint32_t padding;
|
|
|
|
|
|
|
|
|
|
Xorriso_alloc_meM(sfe, char, 5 * SfileadrL);
|
|
|
|
|
Xorriso_alloc_meM(xorriso_id, char, 256);
|
|
|
|
|
Xorriso_alloc_meM(profile_name, char, 80);
|
|
|
|
|
Xorriso_alloc_meM(reasons, char, BURN_REASONS_LEN);
|
|
|
|
|
|
|
|
|
|
ret= Xorriso_finish_hl_update(xorriso, 0);
|
|
|
|
|
if(ret <= 0)
|
|
|
|
@ -1009,6 +1010,38 @@ fprintf(stderr, "XORRISO_DEBUG: isoburn_igopt_set_tail_blocks(%d)\n",
|
|
|
|
|
burn_write_opts_set_stream_recording(burn_options, data_lba);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if(xorriso->do_tao) {
|
|
|
|
|
if (xorriso->do_tao > 0)
|
|
|
|
|
burn_write_opts_set_write_type(burn_options,
|
|
|
|
|
BURN_WRITE_TAO, BURN_BLOCK_MODE1);
|
|
|
|
|
else
|
|
|
|
|
burn_write_opts_set_write_type(burn_options,
|
|
|
|
|
BURN_WRITE_SAO, BURN_BLOCK_SAO);
|
|
|
|
|
|
|
|
|
|
ret = burn_precheck_write(burn_options, disc, reasons, 0);
|
|
|
|
|
if(ret<=0) {
|
|
|
|
|
Xorriso_process_msg_queues(xorriso,0);
|
|
|
|
|
sprintf(xorriso->info_text,
|
|
|
|
|
"Cannot set write type %s for this medium.\n",
|
|
|
|
|
xorriso->do_tao > 0 ? "TAO" : "SAO");
|
|
|
|
|
sprintf(xorriso->info_text+strlen(xorriso->info_text),
|
|
|
|
|
"Reasons given:\n %s", reasons);
|
|
|
|
|
Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "FAILURE", 0);
|
|
|
|
|
ret= 0; goto cancel_iso;
|
|
|
|
|
}
|
|
|
|
|
} else {
|
|
|
|
|
if(burn_write_opts_auto_write_type(burn_options, disc, reasons, 0) ==
|
|
|
|
|
BURN_WRITE_NONE) {
|
|
|
|
|
Xorriso_process_msg_queues(xorriso,0);
|
|
|
|
|
sprintf(xorriso->info_text,
|
|
|
|
|
"Failed to find a suitable write mode with this media.\n");
|
|
|
|
|
sprintf(xorriso->info_text+strlen(xorriso->info_text),
|
|
|
|
|
"Reasons given:\n %s", reasons);
|
|
|
|
|
Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "FAILURE", 0);
|
|
|
|
|
ret= 0; goto cancel_iso;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
ret= Xorriso_sanitize_image_size(xorriso, drive, disc, burn_options, flag&1);
|
|
|
|
|
if(ret<=0 || (flag&1)) {
|
|
|
|
|
Xorriso_process_msg_queues(xorriso,0);
|
|
|
|
@ -1111,6 +1144,7 @@ ex:;
|
|
|
|
|
Xorriso_free_meM(sfe);
|
|
|
|
|
Xorriso_free_meM(xorriso_id);
|
|
|
|
|
Xorriso_free_meM(profile_name);
|
|
|
|
|
Xorriso_free_meM(reasons);
|
|
|
|
|
return(ret);
|
|
|
|
|
|
|
|
|
|
cancel_iso:;
|
|
|
|
@ -1923,14 +1957,34 @@ int Xorriso_burn_track(struct XorrisO *xorriso, off_t write_start_address,
|
|
|
|
|
burn_write_opts_set_start_byte(burn_options, ((off_t) nwa) * (off_t) 2048);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if(burn_write_opts_auto_write_type(burn_options, disc, reasons, 0) ==
|
|
|
|
|
BURN_WRITE_NONE) {
|
|
|
|
|
sprintf(xorriso->info_text,
|
|
|
|
|
"Failed to find a suitable write mode with this media.\n");
|
|
|
|
|
sprintf(xorriso->info_text+strlen(xorriso->info_text),
|
|
|
|
|
"Reasons given:\n%s", reasons);
|
|
|
|
|
Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "FAILURE", 0);
|
|
|
|
|
ret= 0; goto ex;
|
|
|
|
|
if(xorriso->do_tao) {
|
|
|
|
|
if (xorriso->do_tao > 0)
|
|
|
|
|
burn_write_opts_set_write_type(burn_options,
|
|
|
|
|
BURN_WRITE_TAO, BURN_BLOCK_MODE1);
|
|
|
|
|
else
|
|
|
|
|
burn_write_opts_set_write_type(burn_options,
|
|
|
|
|
BURN_WRITE_SAO, BURN_BLOCK_SAO);
|
|
|
|
|
|
|
|
|
|
ret = burn_precheck_write(burn_options, disc, reasons, 0);
|
|
|
|
|
if(ret<=0) {
|
|
|
|
|
sprintf(xorriso->info_text,
|
|
|
|
|
"Cannot set write type %s for this medium.\n",
|
|
|
|
|
xorriso->do_tao > 0 ? "TAO" : "SAO");
|
|
|
|
|
sprintf(xorriso->info_text+strlen(xorriso->info_text),
|
|
|
|
|
"Reasons given:\n%s", reasons);
|
|
|
|
|
Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "FAILURE", 0);
|
|
|
|
|
ret= 0; goto ex;
|
|
|
|
|
}
|
|
|
|
|
} else {
|
|
|
|
|
if(burn_write_opts_auto_write_type(burn_options, disc, reasons, 0) ==
|
|
|
|
|
BURN_WRITE_NONE) {
|
|
|
|
|
sprintf(xorriso->info_text,
|
|
|
|
|
"Failed to find a suitable write mode with this media.\n");
|
|
|
|
|
sprintf(xorriso->info_text+strlen(xorriso->info_text),
|
|
|
|
|
"Reasons given:\n%s", reasons);
|
|
|
|
|
Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "FAILURE", 0);
|
|
|
|
|
ret= 0; goto ex;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
ret= Xorriso_sanitize_image_size(xorriso, drive, disc, burn_options, 2);
|
|
|
|
|