Re-introduced capability of multi-session on overwritables. Spoiled by rev 4780.

master
Thomas Schmitt 10 years ago
parent 23c2b5ef7d
commit c2e3a36d51
  1. 54
      xorriso/write_run.c
  2. 2
      xorriso/xorriso_timestamp.h

@ -610,7 +610,7 @@ ex:;
int Xorriso_write_session(struct XorrisO *xorriso, int flag)
{
int ret, relax= 0, i, pacifier_speed= 0, data_lba, ext, is_bootable= 0;
int freshly_bootable= 0, hide_attr, pad_by_libisofs= 0, signal_mode;
int freshly_bootable= 0, hide_attr, pad_by_libisofs= 0, signal_mode, role;
char *xorriso_id= NULL, *img_id, *sfe= NULL, *out_cs, *part_image;
struct isoburn_imgen_opts *sopts= NULL;
struct burn_drive_info *dinfo, *source_dinfo;
@ -622,6 +622,7 @@ int Xorriso_write_session(struct XorrisO *xorriso, int flag)
struct burn_session **sessions;
struct burn_track **tracks;
enum burn_disc_status s;
struct burn_multi_caps *caps= NULL;
IsoImage *image= NULL;
IsoNode *root_node;
int profile_number;
@ -1010,6 +1011,30 @@ fprintf(stderr, "XORRISO_DEBUG: isoburn_igopt_set_tail_blocks(%d)\n",
burn_write_opts_set_stream_recording(burn_options, data_lba);
}
ret= Xorriso_sanitize_image_size(xorriso, drive, disc, burn_options, flag&1);
if(ret<=0 || (flag&1)) {
Xorriso_process_msg_queues(xorriso,0);
if(flag&1) /* set queue severity to FAILURE */
Xorriso_set_image_severities(xorriso, 2);
if(flag&1) /* reset queue severity */
Xorriso_set_image_severities(xorriso, 0);
goto cancel_iso;
}
ret= Xorriso_may_burn(xorriso, 0);
if(ret <= 0)
goto cancel_iso;
role= burn_drive_get_drive_role(drive);
/* # define Libisoburn_write_type_autO yes */
#ifndef Libisoburn_write_type_autO
ret= burn_disc_get_multi_caps(drive, BURN_WRITE_NONE, &caps, 0);
if(ret > 0) {
if(caps->start_adr || role == 4) /* Multi will be emulated */
burn_write_opts_set_multi(burn_options, 0);
}
if(xorriso->do_tao) {
if (xorriso->do_tao > 0)
burn_write_opts_set_write_type(burn_options,
@ -1022,13 +1047,16 @@ fprintf(stderr, "XORRISO_DEBUG: isoburn_igopt_set_tail_blocks(%d)\n",
if(ret<=0) {
Xorriso_process_msg_queues(xorriso,0);
sprintf(xorriso->info_text,
"Cannot set write type %s for this medium.\n",
"Cannot set write type %s for this medium.",
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;
}
sprintf(xorriso->info_text, "Explicitly chosen write type: %s",
xorriso->do_tao > 0 ? "TAO" : "SAO");
Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "DEBUG", 0);
} else {
if(burn_write_opts_auto_write_type(burn_options, disc, reasons, 0) ==
BURN_WRITE_NONE) {
@ -1042,25 +1070,12 @@ fprintf(stderr, "XORRISO_DEBUG: isoburn_igopt_set_tail_blocks(%d)\n",
}
}
ret= Xorriso_sanitize_image_size(xorriso, drive, disc, burn_options, flag&1);
if(ret<=0 || (flag&1)) {
Xorriso_process_msg_queues(xorriso,0);
if(flag&1) /* set queue severity to FAILURE */
Xorriso_set_image_severities(xorriso, 2);
if(flag&1) /* reset queue severity */
Xorriso_set_image_severities(xorriso, 0);
goto cancel_iso;
}
ret= Xorriso_may_burn(xorriso, 0);
if(ret <= 0)
goto cancel_iso;
#endif /* Libisoburn_write_type_autO */
/* Important: do not return until burn_is_aborting() was checked */
signal_mode= 1;
ret= burn_drive_get_drive_role(drive);
if(ret == 1)
if(role == 1)
signal_mode|= 2;
Xorriso_set_signal_handling(xorriso, signal_mode);
@ -1139,6 +1154,8 @@ ex:;
isoburn_igopt_destroy(&sopts, 0);
if(burn_options != NULL)
burn_write_opts_free(burn_options);
if(caps != NULL)
burn_disc_free_multi_caps(&caps);
Xorriso_process_msg_queues(xorriso,0);
Xorriso_append_scdbackup_record(xorriso, 0);
Xorriso_free_meM(sfe);
@ -1975,6 +1992,9 @@ 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;
}
sprintf(xorriso->info_text, "Explicitly chosen write type: %s",
xorriso->do_tao > 0 ? "TAO" : "SAO");
Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "DEBUG", 0);
} else {
if(burn_write_opts_auto_write_type(burn_options, disc, reasons, 0) ==
BURN_WRITE_NONE) {

@ -1 +1 @@
#define Xorriso_timestamP "2012.07.08.171526"
#define Xorriso_timestamP "2012.07.08.200735"

Loading…
Cancel
Save