New find test -disk_name

This commit is contained in:
2010-06-19 16:56:15 +00:00
parent 9a46cddaac
commit ea5edd0a59
8 changed files with 128 additions and 38 deletions

View File

@ -752,7 +752,7 @@ improper_range:;
}
/* @param flag bit0= -wholename rather than -name
/* @param flag bit0-1= 0= -name , 1= -wholename , 2= -disk_name
*/
int Findjob_set_name_expr(struct FindjoB *o, char *name_expr, int flag)
{
@ -768,7 +768,11 @@ int Findjob_set_name_expr(struct FindjoB *o, char *name_expr, int flag)
if(ret <= 0)
return(ret);
t= o->cursor->test;
t->test_type= (flag & 1 ? 13 : 1);
t->test_type= 1;
if ((flag & 3) == 1)
t->test_type= 13;
else if((flag & 3) == 2)
t->test_type= 16;
name_re= (regex_t *) calloc(1, sizeof(regex_t));
if(name_re == NULL)
return(-1);