|
|
|
@ -256,6 +256,7 @@ int Xorriso_aquire_drive(struct XorrisO *xorriso, char *adr, int flag)
|
|
|
|
|
enum burn_disc_status state;
|
|
|
|
|
IsoImage *volset = NULL;
|
|
|
|
|
struct isoburn_read_opts ropts;
|
|
|
|
|
char adr_data[SfileadrL], *libburn_adr;
|
|
|
|
|
|
|
|
|
|
if((flag&3)==0) {
|
|
|
|
|
sprintf(xorriso->info_text,
|
|
|
|
@ -267,12 +268,25 @@ int Xorriso_aquire_drive(struct XorrisO *xorriso, char *adr, int flag)
|
|
|
|
|
if(ret<=0)
|
|
|
|
|
return(ret);
|
|
|
|
|
|
|
|
|
|
libburn_adr= adr;
|
|
|
|
|
if(strcmp(adr,"stdio:/dev/fd/1")==0) {
|
|
|
|
|
if(xorriso->dev_fd_1<0) {
|
|
|
|
|
sprintf(xorriso->info_text,
|
|
|
|
|
"\"stdio:/dev/fd/1\" was not a start argument. stdout possibly already tainted.");
|
|
|
|
|
Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "SORRY", 0);
|
|
|
|
|
{ret= 0; goto ex;}
|
|
|
|
|
} else {
|
|
|
|
|
sprintf(adr_data, "stdio:/dev/fd/%d", xorriso->dev_fd_1);
|
|
|
|
|
libburn_adr= adr_data;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if((flag&3)==1 && xorriso->out_drive_handle!=NULL) {
|
|
|
|
|
ret= Xorriso_get_drive_handles(xorriso, &out_dinfo, &out_drive,
|
|
|
|
|
"on attempt to compare new indev with outdev", 2);
|
|
|
|
|
if(ret<=0)
|
|
|
|
|
goto ex;
|
|
|
|
|
ret= burn_drive_equals_adr(out_drive, adr, 1);
|
|
|
|
|
ret= burn_drive_equals_adr(out_drive, libburn_adr, 1);
|
|
|
|
|
if(ret==1)
|
|
|
|
|
dinfo= out_dinfo;
|
|
|
|
|
} else if((flag&3)==2 && xorriso->in_drive_handle!=NULL) {
|
|
|
|
@ -280,13 +294,13 @@ int Xorriso_aquire_drive(struct XorrisO *xorriso, char *adr, int flag)
|
|
|
|
|
"on attempt to compare new indev with outdev", 0);
|
|
|
|
|
if(ret<=0)
|
|
|
|
|
goto ex;
|
|
|
|
|
ret= burn_drive_equals_adr(in_drive, adr, 1);
|
|
|
|
|
ret= burn_drive_equals_adr(in_drive, libburn_adr, 1);
|
|
|
|
|
if(ret==1)
|
|
|
|
|
dinfo= in_dinfo;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if(dinfo==NULL) {
|
|
|
|
|
ret= isoburn_drive_scan_and_grab(&dinfo, adr, 1);
|
|
|
|
|
ret= isoburn_drive_scan_and_grab(&dinfo, libburn_adr, 1);
|
|
|
|
|
Xorriso_process_msg_queues(xorriso,0);
|
|
|
|
|
if(ret<=0) {
|
|
|
|
|
sprintf(xorriso->info_text,"Cannot aquire drive '%s'", adr);
|
|
|
|
@ -471,6 +485,8 @@ int Xorriso_make_write_options(
|
|
|
|
|
struct XorrisO *xorriso, struct burn_drive *drive,
|
|
|
|
|
struct burn_write_opts **burn_options, int flag)
|
|
|
|
|
{
|
|
|
|
|
int drive_role;
|
|
|
|
|
|
|
|
|
|
*burn_options= burn_write_opts_new(drive);
|
|
|
|
|
if(*burn_options==NULL) {
|
|
|
|
|
Xorriso_process_msg_queues(xorriso,0);
|
|
|
|
@ -479,7 +495,9 @@ int Xorriso_make_write_options(
|
|
|
|
|
return(0);
|
|
|
|
|
}
|
|
|
|
|
burn_write_opts_set_simulate(*burn_options, !!xorriso->do_dummy);
|
|
|
|
|
burn_write_opts_set_multi(*burn_options, !xorriso->do_close);
|
|
|
|
|
drive_role= burn_drive_get_drive_role(drive);
|
|
|
|
|
burn_write_opts_set_multi(*burn_options,
|
|
|
|
|
!(xorriso->do_close || drive_role==0 || drive_role==3));
|
|
|
|
|
burn_drive_set_speed(drive, xorriso->speed, xorriso->speed);
|
|
|
|
|
burn_write_opts_set_underrun_proof(*burn_options, 1);
|
|
|
|
|
return(1);
|
|
|
|
@ -1353,7 +1371,7 @@ int Xorriso_toc(struct XorrisO *xorriso, int flag)
|
|
|
|
|
int num_sessions= 0, num_tracks= 0, lba= 0, nwa= -1, pmin, psec, pframe, ret;
|
|
|
|
|
int track_count= 0, session_no, track_no, profile_no= -1;
|
|
|
|
|
int last_track_start= 0, last_track_size= -1, num_data= 0, is_data= 0;
|
|
|
|
|
int is_inout_drive= 0;
|
|
|
|
|
int is_inout_drive= 0, drive_role;
|
|
|
|
|
char profile_name[80],*respt,*devadr;
|
|
|
|
|
struct burn_disc *disc= NULL;
|
|
|
|
|
struct burn_session **sessions;
|
|
|
|
@ -1390,9 +1408,15 @@ int Xorriso_toc(struct XorrisO *xorriso, int flag)
|
|
|
|
|
ret= burn_disc_get_profile(drive, &profile_no, profile_name);
|
|
|
|
|
if (profile_no > 0 && ret > 0) {
|
|
|
|
|
if (profile_name[0])
|
|
|
|
|
sprintf(respt+strlen(respt), "%s\n", profile_name);
|
|
|
|
|
sprintf(respt+strlen(respt), "%s", profile_name);
|
|
|
|
|
else
|
|
|
|
|
sprintf(respt+strlen(respt), "%4.4Xh\n", profile_no);
|
|
|
|
|
sprintf(respt+strlen(respt), "%4.4Xh", profile_no);
|
|
|
|
|
drive_role= burn_drive_get_drive_role(drive);
|
|
|
|
|
if(drive_role==2)
|
|
|
|
|
sprintf(respt+strlen(respt), ", overwriteable");
|
|
|
|
|
else if(drive_role==0 || drive_role==3)
|
|
|
|
|
sprintf(respt+strlen(respt), ", sequential");
|
|
|
|
|
strcat(respt, "\n");
|
|
|
|
|
} else
|
|
|
|
|
sprintf(respt+strlen(respt), "is not recognizable\n");
|
|
|
|
|
Xorriso_result(xorriso,0);
|
|
|
|
|