Made structs SpotlistiteM and SpotlisT ready for long block adresses
This commit is contained in:
@ -2418,7 +2418,8 @@ int Xorriso_read_file_data(struct XorrisO *xorriso, IsoNode *node,
|
||||
off_t bytes, int flag)
|
||||
{
|
||||
int ret, i, lba_count= 0, *start_lbas= NULL, *end_lbas= NULL, read_chunk= 16;
|
||||
int lba, count, blocks, quality, spot, bad_extract= 0;
|
||||
int quality, bad_extract= 0;
|
||||
off_t lba, count, blocks, spot;
|
||||
int data_to_skip= 0;
|
||||
uint32_t indev_blocks;
|
||||
off_t size= 0, file_base_bytes= 0, file_processed_bytes= 0, img_adr;
|
||||
@ -2481,7 +2482,7 @@ int Xorriso_read_file_data(struct XorrisO *xorriso, IsoNode *node,
|
||||
for(i= 0; i < lba_count && file_base_bytes < upto_file_bytes; i++) {
|
||||
lba= start_lbas[i];
|
||||
count= end_lbas[i] + 1 - start_lbas[i];
|
||||
new_file_base_bytes= file_base_bytes + ((off_t) count) * (off_t) 2048;
|
||||
new_file_base_bytes= file_base_bytes + count * (off_t) 2048;
|
||||
|
||||
/* skip intervals before img_offset */
|
||||
if(new_file_base_bytes <= img_offset) {
|
||||
@ -2489,7 +2490,7 @@ int Xorriso_read_file_data(struct XorrisO *xorriso, IsoNode *node,
|
||||
continue;
|
||||
}
|
||||
/* Eventually adjust first interval start */
|
||||
img_adr= ((off_t) lba) * (off_t) 2048;
|
||||
img_adr= lba * (off_t) 2048;
|
||||
if(file_base_bytes < img_offset) {
|
||||
img_adr+= img_offset - file_base_bytes;
|
||||
lba= img_adr / (off_t) 2048;
|
||||
@ -2505,8 +2506,8 @@ int Xorriso_read_file_data(struct XorrisO *xorriso, IsoNode *node,
|
||||
job->data_to_limit= size - file_base_bytes;
|
||||
job->data_to_skip= data_to_skip;
|
||||
data_to_skip= 0;
|
||||
file_processed_bytes+= ((off_t) count) * (off_t) 2048;
|
||||
ret= Xorriso_check_interval(xorriso, spotlist, job, lba, count, read_chunk,
|
||||
file_processed_bytes+= count * (off_t) 2048;
|
||||
ret= Xorriso_check_interval(xorriso, spotlist, job, (int) lba, (int) count, read_chunk,
|
||||
0, (flag & 2));
|
||||
if(ret <= 0)
|
||||
goto ex;
|
||||
|
Reference in New Issue
Block a user