Bug fix: -check_media marked untested sectors in sector map as valid
This commit is contained in:
parent
3540f23930
commit
f848697b92
@ -590,7 +590,6 @@ int Checkmediajob_new(struct CheckmediajoB **o, int flag)
|
|||||||
m->report_mode= 0;
|
m->report_mode= 0;
|
||||||
strcpy(m->event_severity, "ALL");
|
strcpy(m->event_severity, "ALL");
|
||||||
m->slow_threshold_seq= 1.0;
|
m->slow_threshold_seq= 1.0;
|
||||||
m->untested_valid= 0;
|
|
||||||
return(1);
|
return(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -632,7 +631,6 @@ int Checkmediajob_copy(struct CheckmediajoB *from, struct CheckmediajoB *to,
|
|||||||
to->report_mode= from->report_mode;
|
to->report_mode= from->report_mode;
|
||||||
strcpy(to->event_severity, from->event_severity);
|
strcpy(to->event_severity, from->event_severity);
|
||||||
to->slow_threshold_seq= from->slow_threshold_seq;
|
to->slow_threshold_seq= from->slow_threshold_seq;
|
||||||
to->untested_valid= from->untested_valid;
|
|
||||||
return(1);
|
return(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -788,18 +786,6 @@ int Xorriso_check_media_setup_job(struct XorrisO *xorriso,
|
|||||||
job->time_limit= num;
|
job->time_limit= num;
|
||||||
else
|
else
|
||||||
job->item_limit= num;
|
job->item_limit= num;
|
||||||
|
|
||||||
#ifdef NIX
|
|
||||||
} else if(strncmp(argv[i], "untested=", 9) == 0) {
|
|
||||||
if(strcmp(argv[i] + 9, "damaged") == 0)
|
|
||||||
job->untested_valid= 0;
|
|
||||||
if(strcmp(argv[i] + 9, "undamaged") == 0 ||
|
|
||||||
strcmp(argv[i] + 9, "ok") == 0)
|
|
||||||
job->untested_valid= 1;
|
|
||||||
else
|
|
||||||
goto unknown_value;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
} else if(strncmp(argv[i], "use=", 4) == 0) {
|
} else if(strncmp(argv[i], "use=", 4) == 0) {
|
||||||
if(strcmp(argv[i] + 4, "outdev") == 0)
|
if(strcmp(argv[i] + 4, "outdev") == 0)
|
||||||
job->use_dev= 1;
|
job->use_dev= 1;
|
||||||
@ -1005,6 +991,7 @@ ex:;
|
|||||||
|
|
||||||
|
|
||||||
/* @param flag bit0= mark untested areas as valid
|
/* @param flag bit0= mark untested areas as valid
|
||||||
|
bit1= leave untested areas as they are
|
||||||
*/
|
*/
|
||||||
int Xorriso_spotlist_to_sectormap(struct XorrisO *xorriso,
|
int Xorriso_spotlist_to_sectormap(struct XorrisO *xorriso,
|
||||||
struct SpotlisT *spotlist,
|
struct SpotlisT *spotlist,
|
||||||
@ -1064,7 +1051,9 @@ int Xorriso_spotlist_to_sectormap(struct XorrisO *xorriso,
|
|||||||
valid= quality > xorriso->check_media_bad_limit;
|
valid= quality > xorriso->check_media_bad_limit;
|
||||||
if(quality == Xorriso_read_quality_untesteD && (flag & 1))
|
if(quality == Xorriso_read_quality_untesteD && (flag & 1))
|
||||||
valid= 1;
|
valid= 1;
|
||||||
else if(pass == 0 && !valid)
|
if(quality == Xorriso_read_quality_untesteD && (flag & 2))
|
||||||
|
continue;
|
||||||
|
if(pass == 0 && !valid)
|
||||||
continue;
|
continue;
|
||||||
else if(pass == 1 && valid)
|
else if(pass == 1 && valid)
|
||||||
continue;
|
continue;
|
||||||
|
@ -144,10 +144,6 @@ struct CheckmediajoB {
|
|||||||
a read operation is considered slow. This does
|
a read operation is considered slow. This does
|
||||||
not apply to thr first read of an interval.
|
not apply to thr first read of an interval.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
int untested_valid; /* 1= mark untested data blocks as valid when calling
|
|
||||||
Xorriso_spotlist_to_sectormap()
|
|
||||||
*/
|
|
||||||
};
|
};
|
||||||
|
|
||||||
int Checkmediajob_new(struct CheckmediajoB **o, int flag);
|
int Checkmediajob_new(struct CheckmediajoB **o, int flag);
|
||||||
|
@ -3240,7 +3240,7 @@ ex:;
|
|||||||
|
|
||||||
if(ret > 0) {
|
if(ret > 0) {
|
||||||
ret= Xorriso_spotlist_to_sectormap(xorriso, *spotlist, read_chunk,
|
ret= Xorriso_spotlist_to_sectormap(xorriso, *spotlist, read_chunk,
|
||||||
&(job->sector_map), !!job->untested_valid);
|
&(job->sector_map), 2);
|
||||||
if(ret > 0 && job->sector_map_path[0]) {
|
if(ret > 0 && job->sector_map_path[0]) {
|
||||||
ret= Sectorbitmap_to_file(job->sector_map, job->sector_map_path, toc_info,
|
ret= Sectorbitmap_to_file(job->sector_map, job->sector_map_path, toc_info,
|
||||||
xorriso->info_text, &os_errno, 0);
|
xorriso->info_text, &os_errno, 0);
|
||||||
|
@ -1 +1 @@
|
|||||||
#define Xorriso_timestamP "2014.01.16.113503"
|
#define Xorriso_timestamP "2014.01.23.200641"
|
||||||
|
Loading…
Reference in New Issue
Block a user