Lines Matching defs:sub
491 * __aa_label_next_not_in_set - return the next profile of @sub not in @set
494 * @sub: label to if is subset of @set
496 * Returns: profile in @sub that is not in @set, with iterator set pos after
497 * else NULL if @sub is a subset of @set
501 struct aa_label *sub)
507 AA_BUG(!sub);
509 AA_BUG(I->j > sub->size);
511 while (I->j < sub->size && I->i < set->size) {
512 int res = profile_cmp(sub->vec[I->j], set->vec[I->i]);
520 return sub->vec[(I->j)++];
523 if (I->j < sub->size)
524 return sub->vec[(I->j)++];
530 * aa_label_is_subset - test if @sub is a subset of @set
532 * @sub: label to test if is subset of @set
534 * Returns: true if @sub is subset of @set
537 bool aa_label_is_subset(struct aa_label *set, struct aa_label *sub)
542 AA_BUG(!sub);
544 if (sub == set)
547 return __aa_label_next_not_in_set(&i, set, sub) == NULL;
551 * aa_label_is_unconfined_subset - test if @sub is a subset of @set
553 * @sub: label to test if is subset of @set
556 * @sub contains an unconfined profile that does not have a matching
559 * @sub
561 * Returns: true if @sub is special_subset of @set
564 bool aa_label_is_unconfined_subset(struct aa_label *set, struct aa_label *sub)
570 AA_BUG(!sub);
572 if (sub == set)
576 p = __aa_label_next_not_in_set(&i, set, sub);