Better handling of empty tray when aquiring drive

This commit is contained in:
Thomas Schmitt 2010-03-29 10:36:38 +00:00
parent 214d6e6741
commit 576af9ea89
2 changed files with 15 additions and 6 deletions

View File

@ -1 +1 @@
#define Xorriso_timestamP "2010.03.29.103419" #define Xorriso_timestamP "2010.03.29.103533"

View File

@ -1177,8 +1177,12 @@ int Xorriso_aquire_drive(struct XorrisO *xorriso, char *adr, int flag)
state != BURN_DISC_FULL) { state != BURN_DISC_FULL) {
sprintf(xorriso->info_text, sprintf(xorriso->info_text,
"Disc status not blank and unsuitable for reading"); "Disc status not blank and unsuitable for reading");
Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "SORRY", 0); sev= "FAILURE";
{ret= 0; goto ex;} if(xorriso->img_read_error_mode==2)
sev= "FATAL";
Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, sev, 0);
Xorriso_give_up_drive(xorriso, 1|((flag&32)>>2));
ret= 3; goto ex;
} }
/* fill read opts */ /* fill read opts */
ret= isoburn_ropt_new(&ropts, 0); ret= isoburn_ropt_new(&ropts, 0);
@ -5357,7 +5361,7 @@ int Xorriso_toc(struct XorrisO *xorriso, int flag)
int track_count= 0, session_no, track_no, profile_no= -1, track_size; int track_count= 0, session_no, track_no, profile_no= -1, track_size;
int last_track_start= 0, last_track_size= -1, num_data= 0, is_data= 0; int last_track_start= 0, last_track_size= -1, num_data= 0, is_data= 0;
int is_inout_drive= 0, drive_role, status, num_formats, emul_lba; int is_inout_drive= 0, drive_role, status, num_formats, emul_lba;
int num_payload= 0, num_wasted= 0, num_nondata= 0; int num_payload= 0, num_wasted= 0, num_nondata= 0, not_reconizable= 0;
char profile_name[80],*respt,*devadr, *typetext= ""; char profile_name[80],*respt,*devadr, *typetext= "";
struct burn_toc_entry toc_entry; struct burn_toc_entry toc_entry;
struct burn_drive_info *dinfo; struct burn_drive_info *dinfo;
@ -5416,8 +5420,10 @@ int Xorriso_toc(struct XorrisO *xorriso, int flag)
else if(drive_role==0 || drive_role==3) else if(drive_role==0 || drive_role==3)
sprintf(respt+strlen(respt), ", sequential"); sprintf(respt+strlen(respt), ", sequential");
strcat(respt, "\n"); strcat(respt, "\n");
} else } else {
sprintf(respt+strlen(respt), "is not recognizable\n"); sprintf(respt+strlen(respt), "is not recognizable\n");
not_reconizable= 1;
}
Xorriso_toc_line(xorriso, flag & 8); Xorriso_toc_line(xorriso, flag & 8);
if((flag & 64) || !(flag & 1)) { if((flag & 64) || !(flag & 1)) {
@ -5428,7 +5434,10 @@ int Xorriso_toc(struct XorrisO *xorriso, int flag)
sprintf(respt, "Media status : "); sprintf(respt, "Media status : ");
if (s == BURN_DISC_FULL) { if (s == BURN_DISC_FULL) {
sprintf(respt+strlen(respt), "is written , is closed\n"); if(not_reconizable)
sprintf(respt+strlen(respt), "is not recognizable\n");
else
sprintf(respt+strlen(respt), "is written , is closed\n");
} else if (s == BURN_DISC_APPENDABLE) { } else if (s == BURN_DISC_APPENDABLE) {
sprintf(respt+strlen(respt), "is written , is appendable\n"); sprintf(respt+strlen(respt), "is written , is appendable\n");
} else if (s == BURN_DISC_BLANK) { } else if (s == BURN_DISC_BLANK) {