Better handling of empty tray when aquiring drive

master
Thomas Schmitt 13 years ago
parent 214d6e6741
commit 576af9ea89
  1. 2
      xorriso/xorriso_timestamp.h
  2. 19
      xorriso/xorrisoburn.c

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

@ -1177,8 +1177,12 @@ int Xorriso_aquire_drive(struct XorrisO *xorriso, char *adr, int flag)
state != BURN_DISC_FULL) {
sprintf(xorriso->info_text,
"Disc status not blank and unsuitable for reading");
Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "SORRY", 0);
{ret= 0; goto ex;}
sev= "FAILURE";
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 */
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 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 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= "";
struct burn_toc_entry toc_entry;
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)
sprintf(respt+strlen(respt), ", sequential");
strcat(respt, "\n");
} else
} else {
sprintf(respt+strlen(respt), "is not recognizable\n");
not_reconizable= 1;
}
Xorriso_toc_line(xorriso, flag & 8);
if((flag & 64) || !(flag & 1)) {
@ -5428,7 +5434,10 @@ int Xorriso_toc(struct XorrisO *xorriso, int flag)
sprintf(respt, "Media status : ");
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) {
sprintf(respt+strlen(respt), "is written , is appendable\n");
} else if (s == BURN_DISC_BLANK) {

Loading…
Cancel
Save