Avoided lots of error messege when checking media in empty drive

This commit is contained in:
Thomas Schmitt 2012-02-01 12:26:59 +00:00
parent fdeb97fc28
commit ec01b598b9
2 changed files with 13 additions and 2 deletions

View File

@ -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;

View File

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