From 576af9ea890069c66b09c3f3aaab9ec47d8f8123 Mon Sep 17 00:00:00 2001 From: Thomas Schmitt Date: Mon, 29 Mar 2010 10:36:38 +0000 Subject: [PATCH] Better handling of empty tray when aquiring drive --- xorriso/xorriso_timestamp.h | 2 +- xorriso/xorrisoburn.c | 19 ++++++++++++++----- 2 files changed, 15 insertions(+), 6 deletions(-) diff --git a/xorriso/xorriso_timestamp.h b/xorriso/xorriso_timestamp.h index 5507cdb9..83a58947 100644 --- a/xorriso/xorriso_timestamp.h +++ b/xorriso/xorriso_timestamp.h @@ -1 +1 @@ -#define Xorriso_timestamP "2010.03.29.103419" +#define Xorriso_timestamP "2010.03.29.103533" diff --git a/xorriso/xorrisoburn.c b/xorriso/xorrisoburn.c index 1da08523..5fd310e3 100644 --- a/xorriso/xorrisoburn.c +++ b/xorriso/xorrisoburn.c @@ -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) {