New -close mode "as_needed"
This commit is contained in:
@ -67,6 +67,8 @@ int Xorriso_check_multi(struct XorrisO *xorriso, struct burn_drive *drive,
|
||||
struct burn_multi_caps *caps= NULL;
|
||||
char profile_name[80];
|
||||
|
||||
if(xorriso->auto_close)
|
||||
xorriso->do_close= 0;
|
||||
if(!xorriso->do_close) {
|
||||
burn_disc_get_profile(drive, &profile_no, profile_name);
|
||||
if(profile_no == 0x14) { /* DVD-RW sequential */
|
||||
@ -74,7 +76,12 @@ int Xorriso_check_multi(struct XorrisO *xorriso, struct burn_drive *drive,
|
||||
if(caps != NULL)
|
||||
burn_disc_free_multi_caps(&caps);
|
||||
if(ret == 0) {
|
||||
if(flag & 1) {
|
||||
if(xorriso->auto_close) {
|
||||
sprintf(xorriso->info_text,
|
||||
"-close \"as_needed\" triggered -close \"on\"");
|
||||
Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "NOTE", 0);
|
||||
xorriso->do_close= 1;
|
||||
} else if(flag & 1) {
|
||||
sprintf(xorriso->info_text,
|
||||
"This DVD-RW media can only be written without option -multi");
|
||||
Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "FAILURE", 0);
|
||||
@ -84,6 +91,7 @@ int Xorriso_check_multi(struct XorrisO *xorriso, struct burn_drive *drive,
|
||||
sprintf(xorriso->info_text,
|
||||
"After writing a session without -multi, apply blank=all");
|
||||
Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "HINT", 0);
|
||||
return(0);
|
||||
} else {
|
||||
sprintf(xorriso->info_text,
|
||||
"This DVD-RW media can only be written with -close \"on\"");
|
||||
@ -94,18 +102,26 @@ int Xorriso_check_multi(struct XorrisO *xorriso, struct burn_drive *drive,
|
||||
sprintf(xorriso->info_text,
|
||||
"After writing a session with -close \"on\", apply -blank \"all\"");
|
||||
Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "HINT", 0);
|
||||
return(0);
|
||||
}
|
||||
return(0);
|
||||
}
|
||||
} else if(profile_no == 0x15) { /* DVD-RW DL */
|
||||
if(flag & 1)
|
||||
if(xorriso->auto_close) {
|
||||
sprintf(xorriso->info_text,
|
||||
"-close \"as_needed\" triggered -close \"on\"");
|
||||
Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "NOTE", 0);
|
||||
xorriso->do_close= 1;
|
||||
} else if(flag & 1) {
|
||||
sprintf(xorriso->info_text,
|
||||
"DVD-R DL media can only be written without option -multi");
|
||||
else
|
||||
Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "FAILURE", 0);
|
||||
return(0);
|
||||
} else {
|
||||
sprintf(xorriso->info_text,
|
||||
"DVD-R DL media can only be written with -close \"on\"");
|
||||
Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "FAILURE", 0);
|
||||
return(0);
|
||||
Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "FAILURE", 0);
|
||||
return(0);
|
||||
}
|
||||
}
|
||||
}
|
||||
return(1);
|
||||
@ -2728,9 +2744,12 @@ int Xorriso_close_damaged(struct XorrisO *xorriso, int flag)
|
||||
ret= 0; goto ex;
|
||||
}
|
||||
ret= Xorriso_get_drive_handles(xorriso, &dinfo, &drive,
|
||||
"on attempt to closed damaged session", 2);
|
||||
"on attempt to close damaged session", 2);
|
||||
if(ret<=0)
|
||||
goto ex;
|
||||
ret= Xorriso_check_multi(xorriso, drive, 0);
|
||||
if(ret<=0)
|
||||
goto ex;
|
||||
ret= Xorriso_make_write_options(xorriso, drive, &burn_options, 0);
|
||||
if(ret <= 0)
|
||||
goto ex;
|
||||
|
Reference in New Issue
Block a user