New option -grow_blindly
This commit is contained in:
@ -955,15 +955,26 @@ int Xorriso_write_session(struct XorrisO *xorriso, int flag)
|
||||
if(xorriso->out_drive_handle == xorriso->in_drive_handle ||
|
||||
xorriso->in_drive_handle == NULL) {
|
||||
ret= isoburn_prepare_disc(source_drive, &disc, sopts);
|
||||
} else if (xorriso->grow_blindly_msc2 >= 0) {
|
||||
ret= isoburn_prepare_blind_grow(source_drive, &disc, sopts, drive,
|
||||
xorriso->grow_blindly_msc2);
|
||||
if(ret>0) {
|
||||
/* Allow the consumer of output to access the input drive */
|
||||
source_drive= NULL;
|
||||
ret= Xorriso_give_up_drive(xorriso, 1);
|
||||
if(ret<=0)
|
||||
goto ex;
|
||||
}
|
||||
} else {
|
||||
ret= isoburn_prepare_new_image(source_drive, &disc, sopts, drive);
|
||||
}
|
||||
if (ret <= 0) {
|
||||
if(ret <= 0) {
|
||||
Xorriso_process_msg_queues(xorriso,0);
|
||||
sprintf(xorriso->info_text,"Failed to prepare session write run");
|
||||
Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "FAILURE", 0);
|
||||
{ret= 0; goto ex;}
|
||||
}
|
||||
|
||||
isoburn_igopt_get_effective_lba(sopts, &(xorriso->session_lba));
|
||||
|
||||
ret= Xorriso_make_write_options(xorriso, drive, &burn_options, 0);
|
||||
@ -1010,7 +1021,6 @@ int Xorriso_write_session(struct XorrisO *xorriso, int flag)
|
||||
Xorriso_info(xorriso, 0);
|
||||
}
|
||||
}
|
||||
|
||||
ret= isoburn_activate_session(drive);
|
||||
Xorriso_process_msg_queues(xorriso,0);
|
||||
if(ret<=0) {
|
||||
@ -3606,7 +3616,7 @@ int Xorriso_toc(struct XorrisO *xorriso, int flag)
|
||||
int Xorriso_show_devices(struct XorrisO *xorriso, int flag)
|
||||
{
|
||||
char adr[BURN_DRIVE_ADR_LEN];
|
||||
int i;
|
||||
int i, j, max_dev_len= 1, pad;
|
||||
struct burn_drive_info *drive_list= NULL;
|
||||
unsigned int drive_count;
|
||||
char *respt, perms[8];
|
||||
@ -3634,6 +3644,13 @@ int Xorriso_show_devices(struct XorrisO *xorriso, int flag)
|
||||
Xorriso_info(xorriso,0);
|
||||
|
||||
respt= xorriso->result_line;
|
||||
for(i= 0; i < drive_count && !(xorriso->request_to_abort); i++) {
|
||||
if(burn_drive_get_adr(&(drive_list[i]), adr)<=0)
|
||||
strcpy(adr, "-get_adr_failed-");
|
||||
Xorriso_process_msg_queues(xorriso,0);
|
||||
if(strlen(adr)>max_dev_len)
|
||||
max_dev_len= strlen(adr);
|
||||
}
|
||||
for(i= 0; i < drive_count && !(xorriso->request_to_abort); i++) {
|
||||
if(burn_drive_get_adr(&(drive_list[i]), adr)<=0)
|
||||
strcpy(adr, "-get_adr_failed-");
|
||||
@ -3649,8 +3666,13 @@ int Xorriso_show_devices(struct XorrisO *xorriso, int flag)
|
||||
if(stbuf.st_mode&S_IROTH) perms[4]= 'r';
|
||||
if(stbuf.st_mode&S_IWOTH) perms[5]= 'w';
|
||||
}
|
||||
sprintf(respt, "%d -dev '%s' %s : '%-8.8s' '%s' \n",
|
||||
i, adr, perms, drive_list[i].vendor, drive_list[i].product);
|
||||
sprintf(respt, "%d -dev '%s' ", i, adr);
|
||||
pad= max_dev_len-strlen(adr);
|
||||
if(pad>0)
|
||||
for(j= 0; j<pad; j++)
|
||||
strcat(respt, " ");
|
||||
sprintf(respt+strlen(respt), "%s : '%-8.8s' '%s' \n",
|
||||
perms, drive_list[i].vendor, drive_list[i].product);
|
||||
Xorriso_result(xorriso,0);
|
||||
}
|
||||
burn_drive_info_free(drive_list);
|
||||
|
Reference in New Issue
Block a user