1 /* SPDX-License-Identifier: GPL-2.0+ OR Apache-2.0 */ 2 /* 3 * Created by Li Guifu <[email protected]> 4 */ 5 #ifndef __EROFS_EXCLUDE_H 6 #define __EROFS_EXCLUDE_H 7 8 #ifdef __cplusplus 9 extern "C" 10 { 11 #endif 12 13 #include <sys/types.h> 14 #include <regex.h> 15 16 struct erofs_exclude_rule { 17 struct list_head list; 18 19 char *pattern; 20 regex_t reg; 21 }; 22 23 void erofs_exclude_set_root(const char *rootdir); 24 void erofs_cleanup_exclude_rules(void); 25 26 int erofs_parse_exclude_path(const char *args, bool is_regex); 27 struct erofs_exclude_rule *erofs_is_exclude_path(const char *dir, 28 const char *name); 29 30 #ifdef __cplusplus 31 } 32 #endif 33 34 #endif 35