Made struct ExprtesT test -lba_range ready for long block adresses
This commit is contained in:
@ -3055,7 +3055,8 @@ return:
|
||||
3 = immediate decision : does match
|
||||
*/
|
||||
{
|
||||
int value=0, ret, start_lba, end_lba, bless_idx, size_mode;
|
||||
int value=0, ret, start_lba, bless_idx, size_mode;
|
||||
off_t range_lba, end_lba;
|
||||
int lba_count, *file_end_lbas= NULL, *file_start_lbas= NULL, i, mask;
|
||||
void *arg1, *arg2;
|
||||
char ft, *decision, md5[16], bless_code[17];
|
||||
@ -3146,10 +3147,10 @@ return:
|
||||
|
||||
break; case 4: /* -lba_range *arg1 *arg2 */
|
||||
value= 1;
|
||||
start_lba= *((int *) ftest->arg1);
|
||||
end_lba= *((int *) ftest->arg2);
|
||||
range_lba= *((off_t *) ftest->arg1);
|
||||
end_lba= *((off_t *) ftest->arg2);
|
||||
if(node == NULL) {
|
||||
value= !(start_lba >= 0);
|
||||
value= !(range_lba >= 0);
|
||||
goto ex;
|
||||
}
|
||||
ret= Xorriso__start_end_lbas(node, &lba_count, &file_start_lbas,
|
||||
@ -3157,15 +3158,15 @@ return:
|
||||
if(ret <= 0) {
|
||||
if(ret < 0)
|
||||
Xorriso_process_msg_queues(xorriso, 0);
|
||||
if(start_lba >= 0)
|
||||
if(range_lba >= 0)
|
||||
value= 0;
|
||||
} else {
|
||||
for(i= 0; i < lba_count; i++) {
|
||||
if(start_lba >= 0) {
|
||||
if(file_end_lbas[i] < start_lba || file_start_lbas[i] > end_lba)
|
||||
if(range_lba >= 0) {
|
||||
if(file_end_lbas[i] < range_lba || file_start_lbas[i] > end_lba)
|
||||
value= 0;
|
||||
} else {
|
||||
if(file_end_lbas[i] >= -start_lba && file_start_lbas[i] <= -end_lba)
|
||||
if(file_end_lbas[i] >= -range_lba && file_start_lbas[i] <= -end_lba)
|
||||
value= 0;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user