Adapted -chek_media to peculiarities of DVD and BD

This commit is contained in:
Thomas Schmitt 2014-04-19 11:52:07 +00:00
parent 167284e78c
commit 36029c0b23
5 changed files with 93 additions and 62 deletions

View File

@ -2610,6 +2610,7 @@ int Xorriso_check_interval(struct XorrisO *xorriso, struct SpotlisT *spotlist,
{
int i, j, ret, total_count= 0, sectors= -1, sector_size= -1, skip_reading;
int prev_quality= -1, quality= -1, retry= 0, profile_no, is_cd= 0;
int eccb_size= 16;
int start_sec, end_sec, first_value, fret, suspect_tao_end= 0;
char profile_name[80];
int start_lba= 0;
@ -2657,10 +2658,15 @@ int Xorriso_check_interval(struct XorrisO *xorriso, struct SpotlisT *spotlist,
goto ex;
ret= burn_disc_get_profile(drive, &profile_no, profile_name);
if(ret > 0) {
if(profile_no >= 0x08 && profile_no <= 0x0a)
if(profile_no >= 0x08 && profile_no <= 0x0a) {
is_cd= 1;
eccb_size= 1;
} else if(profile_no >= 0x40 && profile_no <= 0x43) {
eccb_size= 32;
} else if(burn_drive_get_drive_role(drive) != 1) {
eccb_size= 1;
}
}
if(job->sector_map != NULL) {
Sectorbitmap_get_layout(job->sector_map, &sectors, &sector_size, 0);
@ -2815,7 +2821,6 @@ abort_check:;
goto ex;
data_pt= state.chunk[state.chunk_w_idx];
}
ret= burn_read_data(drive, ((off_t) (i + from_lba)) * (off_t) 2048,
data_pt, to_read * (off_t) 2048, &data_count,
(4 * !retry) | (16 * !!suspect_tao_end));
@ -2847,10 +2852,12 @@ abort_check:;
quality= Xorriso_read_quality_tao_enD;
else
quality= Xorriso_read_quality_unreadablE;
if(retry)
to_read= data_count / 2048 + 1;
} else
if(retry) /* skip one eccb_size */
to_read= data_count / 2048 + eccb_size;
} else { /* (can hardly happen) */
quality= Xorriso_read_quality_partiaL;
}
fret= Xorriso_eval_problem_status(xorriso, ret, 1|2);
if(fret<0)
goto ex;

View File

@ -9,7 +9,7 @@
.\" First parameter, NAME, should be all caps
.\" Second parameter, SECTION, should be 1-8, maybe w/ subsection
.\" other parameters are allowed: see man(7), man(1)
.TH XORRISO 1 "Version 1.3.7, Apr 16, 2014"
.TH XORRISO 1 "Version 1.3.7, Apr 19, 2014"
.\" Please adjust this date whenever revising the manpage.
.\"
.\" Some roff macros, for reference:
@ -4067,10 +4067,15 @@ omits all blocks with addresses lower than limit.
\fBmax_lba=limit\fR
switches to what=disc and omits all blocks above limit.
.br
\fBchunk_size=size\fR
sets the number of bytes to be read in one low\-level read operation.
This gets rounded down to full blocks of 2048 bytes. 0 means automatic size.
.br
\fBretry="on"\fR
forces read retries with single blocks when the normal read
chunk produces a read error. By default, retries are only enabled with CD
media. "retry=off" forbits retries for all media types.
forces read retries with minimal senseful chunk size when the normal read
chunk produces a read error. This size is 1s with CD and stdio files,
16s with DVD (1 ECC Block), and 32s with BD (1 Cluster).
By default, retries are only enabled with CD media. "retry=off" forbits retries for all media types.
.br
\fBabort_file=disk_path\fR
gives the path of the file which may abort a scan run. Abort
@ -4136,14 +4141,17 @@ sets the highest quality which shall be considered as damage.
Choose one of "good", "md5_match", "slow", "partial", "valid", "untested",
"invalid", "tao_end", "off_track", "md5_mismatch", "unreadable".
.br
"valid" and "invalid" are qualities imported from a sector_map file.
"tao_end" and "off_track" are intentionally not readable, but not bad either.
"partial" are blocks retrieved from a partially readable chunk. They are
supposed to be ok but stem from a suspicious neighborhood.
.br
"md5_match" and "md5_mismatch" regions overlap with regions of other quality.
.br
\fBslow_limit=threshold\fR
sets the time threshold for a single read chunk to be considered
slow. This may be a fractional number like 0.1 or 1.5.
.br
\fBchunk_size=size\fR
sets the number of bytes to be read in one read operation.
This gets rounded down to full blocks of 2048 bytes. 0 means automatic size.
.br
\fBasync_chunks=number\fR
enables asynchronous MD5 processing if number is 2 or larger.
In this case the given number of read chunks is allocated as fifo buffer.

View File

@ -3557,11 +3557,16 @@ transmission errors.
omits all blocks with addresses lower than limit.
max_lba=limit
switches to what=disc and omits all blocks above limit.
chunk_size=size
sets the number of bytes to be read in one low-level read
operation. This gets rounded down to full blocks of 2048
bytes. 0 means automatic size.
retry="on"
forces read retries with single blocks when the normal read
chunk produces a read error. By default, retries are only
enabled with CD media. "retry=off" forbits retries for all
media types.
forces read retries with minimal senseful chunk size when the
normal read chunk produces a read error. This size is 1s with
CD and stdio files, 16s with DVD (1 ECC Block), and 32s with
BD (1 Cluster). By default, retries are only enabled with CD
media. "retry=off" forbits retries for all media types.
abort_file=disk_path
gives the path of the file which may abort a scan run. Abort
happens if the file exists and its mtime is not older than
@ -3622,14 +3627,17 @@ transmission errors.
Choose one of "good", "md5_match", "slow", "partial",
"valid", "untested", "invalid", "tao_end", "off_track",
"md5_mismatch", "unreadable".
"valid" and "invalid" are qualities imported from a
sector_map file. "tao_end" and "off_track" are intentionally
not readable, but not bad either. "partial" are blocks
retrieved from a partially readable chunk. They are supposed
to be ok but stem from a suspicious neighborhood.
"md5_match" and "md5_mismatch" regions overlap with regions
of other quality.
slow_limit=threshold
sets the time threshold for a single read chunk to be
considered slow. This may be a fractional number like 0.1 or
1.5.
chunk_size=size
sets the number of bytes to be read in one read operation.
This gets rounded down to full blocks of 2048 bytes. 0 means
automatic size.
async_chunks=number
enables asynchronous MD5 processing if number is 2 or larger.
In this case the given number of read chunks is allocated as
@ -4970,8 +4978,8 @@ File: xorriso.info, Node: CommandIdx, Next: ConceptIdx, Prev: Legal, Up: Top
* -cdx sets working directory on disk: Navigate. (line 16)
* -changes_pending overrides change status: Writing. (line 13)
* -charset sets input/output character set: Charset. (line 54)
* -check_md5 verifies file checksum: Verify. (line 158)
* -check_md5_r verifies file tree checksums: Verify. (line 174)
* -check_md5 verifies file checksum: Verify. (line 166)
* -check_md5_r verifies file tree checksums: Verify. (line 182)
* -check_media reads media block by block: Verify. (line 21)
* -check_media_defaults sets -check_media options: Verify. (line 41)
* -chgrp sets group in ISO image: Manip. (line 57)
@ -5443,8 +5451,8 @@ File: xorriso.info, Node: ConceptIdx, Prev: CommandIdx, Up: Top
* Verify, compare ISO and disk file, -compare: Navigate. (line 146)
* Verify, compare ISO and disk tree, -compare_r: Navigate. (line 159)
* Verify, compare ISO and disk, -compare_l: Navigate. (line 164)
* Verify, file checksum, -check_md5: Verify. (line 158)
* Verify, file tree checksums, -check_md5_r: Verify. (line 174)
* Verify, file checksum, -check_md5: Verify. (line 166)
* Verify, file tree checksums, -check_md5_r: Verify. (line 182)
* Verify, preset -check_media, -check_media_defaults: Verify. (line 41)
* Write, block size, -dvd_obs: SetWrite. (line 333)
* Write, bootability, -boot_image: Bootable. (line 27)
@ -5504,32 +5512,32 @@ Node: DialogCtl160283
Node: Inquiry162881
Node: Navigate170016
Node: Verify178314
Node: Restore187578
Node: Emulation194665
Node: Scripting205053
Node: Frontend212824
Node: Examples222431
Node: ExDevices223609
Node: ExCreate224275
Node: ExDialog225560
Node: ExGrowing226825
Node: ExModifying227630
Node: ExBootable228134
Node: ExCharset228686
Node: ExPseudo229578
Node: ExCdrecord230476
Node: ExMkisofs230793
Node: ExGrowisofs232133
Node: ExException233268
Node: ExTime233722
Node: ExIncBackup234181
Node: ExRestore238161
Node: ExRecovery239094
Node: Files239664
Node: Seealso240963
Node: Bugreport241686
Node: Legal242267
Node: CommandIdx243278
Node: ConceptIdx260013
Node: Restore188141
Node: Emulation195228
Node: Scripting205616
Node: Frontend213387
Node: Examples222994
Node: ExDevices224172
Node: ExCreate224838
Node: ExDialog226123
Node: ExGrowing227388
Node: ExModifying228193
Node: ExBootable228697
Node: ExCharset229249
Node: ExPseudo230141
Node: ExCdrecord231039
Node: ExMkisofs231356
Node: ExGrowisofs232696
Node: ExException233831
Node: ExTime234285
Node: ExIncBackup234744
Node: ExRestore238724
Node: ExRecovery239657
Node: Files240227
Node: Seealso241526
Node: Bugreport242249
Node: Legal242830
Node: CommandIdx243841
Node: ConceptIdx260576

End Tag Table

View File

@ -50,7 +50,7 @@
@c man .\" First parameter, NAME, should be all caps
@c man .\" Second parameter, SECTION, should be 1-8, maybe w/ subsection
@c man .\" other parameters are allowed: see man(7), man(1)
@c man .TH XORRISO 1 "Version 1.3.7, Apr 16, 2014"
@c man .TH XORRISO 1 "Version 1.3.7, Apr 19, 2014"
@c man .\" Please adjust this date whenever revising the manpage.
@c man .\"
@c man .\" Some roff macros, for reference:
@ -4753,10 +4753,15 @@ omits all blocks with addresses lower than limit.
@item max_lba=limit
switches to what=disc and omits all blocks above limit.
@*
@item chunk_size=size
sets the number of bytes to be read in one low-level read operation.
This gets rounded down to full blocks of 2048 bytes. 0 means automatic size.
@*
@item retry="on"
forces read retries with single blocks when the normal read
chunk produces a read error. By default, retries are only enabled with CD
media. "retry=off" forbits retries for all media types.
forces read retries with minimal senseful chunk size when the normal read
chunk produces a read error. This size is 1s with CD and stdio files,
16s with DVD (1 ECC Block), and 32s with BD (1 Cluster).
By default, retries are only enabled with CD media. "retry=off" forbits retries for all media types.
@*
@item abort_file=disk_path
gives the path of the file which may abort a scan run. Abort
@ -4822,14 +4827,17 @@ sets the highest quality which shall be considered as damage.
Choose one of "good", "md5_match", "slow", "partial", "valid", "untested",
"invalid", "tao_end", "off_track", "md5_mismatch", "unreadable".
@*
"valid" and "invalid" are qualities imported from a sector_map file.
"tao_end" and "off_track" are intentionally not readable, but not bad either.
"partial" are blocks retrieved from a partially readable chunk. They are
supposed to be ok but stem from a suspicious neighborhood.
@*
"md5_match" and "md5_mismatch" regions overlap with regions of other quality.
@*
@item slow_limit=threshold
sets the time threshold for a single read chunk to be considered
slow. This may be a fractional number like 0.1 or 1.5.
@*
@item chunk_size=size
sets the number of bytes to be read in one read operation.
This gets rounded down to full blocks of 2048 bytes. 0 means automatic size.
@*
@item async_chunks=number
enables asynchronous MD5 processing if number is 2 or larger.
In this case the given number of read chunks is allocated as fifo buffer.

View File

@ -1 +1 @@
#define Xorriso_timestamP "2014.04.16.145517"
#define Xorriso_timestamP "2014.04.19.115057"