Avoided lots of error messege when checking media in empty drive

master
Thomas Schmitt 11 years ago
parent fdeb97fc28
commit ec01b598b9
  1. 13
      xorriso/drive_mgt.c
  2. 2
      xorriso/xorriso_timestamp.h

@ -2124,9 +2124,11 @@ int Xorriso_check_interval(struct XorrisO *xorriso, struct SpotlisT *spotlist,
if(ret<=0)
goto ex;
ret= burn_disc_get_profile(drive, &profile_no, profile_name);
if(ret > 0)
if(ret > 0) {
if(profile_no >= 0x08 && profile_no <= 0x0a)
is_cd= 1;
}
if(job->sector_map != NULL) {
Sectorbitmap_get_layout(job->sector_map, &sectors, &sector_size, 0);
@ -2477,6 +2479,7 @@ int Xorriso_check_media(struct XorrisO *xorriso, struct SpotlisT **spotlist,
char *toc_info= NULL, profile_name[80];
struct burn_drive *drive;
struct burn_drive_info *dinfo;
enum burn_disc_status s;
struct isoburn_toc_disc *isoburn_disc= NULL;
struct isoburn_toc_session **isoburn_sessions;
struct isoburn_toc_track **iso_burn_tracks;
@ -2530,6 +2533,14 @@ int Xorriso_check_media(struct XorrisO *xorriso, struct SpotlisT **spotlist,
if(ret <= 0)
goto ex;
}
s= isoburn_disc_get_status(drive);
if(s != BURN_DISC_APPENDABLE && s != BURN_DISC_FULL) {
Xorriso_msgs_submit(xorriso, 0, "-check_media: No readable medium found",
0, "SORRY", 0);
ret= 0; goto ex;
}
ret= burn_get_read_capacity(drive, &read_capacity, 0);
if(ret <= 0)
read_capacity= -1;

@ -1 +1 @@
#define Xorriso_timestamP "2012.01.31.130405"
#define Xorriso_timestamP "2012.02.01.122709"

Loading…
Cancel
Save