Lines Matching full:pattern

606  * tomoyo_const_part_length - Evaluate the initial length without a pattern in a token.
610 * Returns the initial length without a pattern in @filename.
666 * tomoyo_file_matches_pattern2 - Pattern matching without '/' character and "\-" pattern.
670 * @pattern: The start of pattern to compare.
671 * @pattern_end: The end of pattern to compare.
673 * Returns true if @filename matches @pattern, false otherwise.
677 const char *pattern, in tomoyo_file_matches_pattern2() argument
680 while (filename < filename_end && pattern < pattern_end) { in tomoyo_file_matches_pattern2()
685 if (*pattern != '\\') { in tomoyo_file_matches_pattern2()
686 if (*filename++ != *pattern++) in tomoyo_file_matches_pattern2()
691 pattern++; in tomoyo_file_matches_pattern2()
692 switch (*pattern) { in tomoyo_file_matches_pattern2()
728 && strncmp(filename + 1, pattern, 3) == 0) { in tomoyo_file_matches_pattern2()
730 pattern += 2; in tomoyo_file_matches_pattern2()
739 pattern + 1, pattern_end)) in tomoyo_file_matches_pattern2()
742 if (c == '.' && *pattern == '@') in tomoyo_file_matches_pattern2()
751 break; /* Bad pattern. */ in tomoyo_file_matches_pattern2()
756 c = *pattern; in tomoyo_file_matches_pattern2()
770 pattern + 1, pattern_end)) in tomoyo_file_matches_pattern2()
773 return false; /* Not matched or bad pattern. */ in tomoyo_file_matches_pattern2()
776 pattern++; in tomoyo_file_matches_pattern2()
778 while (*pattern == '\\' && in tomoyo_file_matches_pattern2()
779 (*(pattern + 1) == '*' || *(pattern + 1) == '@')) in tomoyo_file_matches_pattern2()
780 pattern += 2; in tomoyo_file_matches_pattern2()
781 return filename == filename_end && pattern == pattern_end; in tomoyo_file_matches_pattern2()
785 * tomoyo_file_matches_pattern - Pattern matching without '/' character.
789 * @pattern: The start of pattern to compare.
790 * @pattern_end: The end of pattern to compare.
792 * Returns true if @filename matches @pattern, false otherwise.
796 const char *pattern, in tomoyo_file_matches_pattern() argument
799 const char *pattern_start = pattern; in tomoyo_file_matches_pattern()
803 while (pattern < pattern_end - 1) { in tomoyo_file_matches_pattern()
804 /* Split at "\-" pattern. */ in tomoyo_file_matches_pattern()
805 if (*pattern++ != '\\' || *pattern++ != '-') in tomoyo_file_matches_pattern()
810 pattern - 2); in tomoyo_file_matches_pattern()
816 pattern_start = pattern; in tomoyo_file_matches_pattern()
824 * tomoyo_path_matches_pattern2 - Do pathname pattern matching.
827 * @p: The start of pattern to compare.
855 /* Ignore trailing "\*" and "\@" in @pattern. */ in tomoyo_path_matches_pattern2()
862 * The "\{" pattern is permitted only after '/' character. in tomoyo_path_matches_pattern2()
864 * Also, the "\}" pattern is permitted only before '/' character in tomoyo_path_matches_pattern2()
869 return false; /* Bad pattern. */ in tomoyo_path_matches_pattern2()
871 /* Compare current component with pattern. */ in tomoyo_path_matches_pattern2()
889 * tomoyo_path_matches_pattern - Check whether the given filename matches the given pattern.
892 * @pattern: The pattern to compare.
915 const struct tomoyo_path_info *pattern) in tomoyo_path_matches_pattern() argument
918 const char *p = pattern->name; in tomoyo_path_matches_pattern()
919 const int len = pattern->const_len; in tomoyo_path_matches_pattern()
921 /* If @pattern doesn't contain pattern, I can use strcmp(). */ in tomoyo_path_matches_pattern()
922 if (!pattern->is_patterned) in tomoyo_path_matches_pattern()
923 return !tomoyo_pathcmp(filename, pattern); in tomoyo_path_matches_pattern()
925 if (filename->is_dir != pattern->is_dir) in tomoyo_path_matches_pattern()