New -find test -size

This commit is contained in:
2022-11-10 10:51:21 +01:00
parent a28040df18
commit 008620e19c
10 changed files with 246 additions and 52 deletions

View File

@ -1,7 +1,7 @@
/* xorriso - creates, loads, manipulates and burns ISO 9660 filesystem images.
Copyright 2007-2016 Thomas Schmitt, <scdbackup@gmx.net>
Copyright 2007-2022 Thomas Schmitt, <scdbackup@gmx.net>
Provided under GPL version 2 or later.
@ -895,6 +895,28 @@ int Findjob_set_num_filter(struct FindjoB *o, int test_type,
}
int Findjob_set_size_filter(struct FindjoB *o, int test_type,
off_t num1, int num2, int flag)
{
struct ExprtesT *t;
int ret;
ret= Findjob_default_and(o, 0);
if(ret <= 0)
return(ret);
t= o->cursor->test;
t->test_type= test_type;
t->arg1= calloc(sizeof(off_t), 1);
t->arg2= calloc(sizeof(int), 1);
if(t->arg1 == NULL || t->arg2 == NULL)
return(-1);
*((off_t *) t->arg1)= num1;
*((int *) t->arg2)= num2;
return(1);
}
int Findjob_set_lba_range(struct FindjoB *o, int start_lba, int count,
int flag)
{