int name_is_excluded(const char *fname, int name_flags, int filter_level)
{
	if (daemon_filter_list.head && check_filter(&daemon_filter_list, FLOG, fname, name_flags) < 0) {
		if (!(name_flags & NAME_IS_XATTR))
			errno = ENOENT;
		return 1;
	}

	if (filter_level != ALL_FILTERS)
		return 0;

	if (filter_list.head && check_filter(&filter_list, FINFO, fname, name_flags) < 0)
		return 1;

	return 0;
}
int name_is_excluded(const char *fname, int name_flags, int filter_level)
{
	if (daemon_filter_list.head && check_filter(&daemon_filter_list, FLOG, fname, name_flags) < 0) {
		if (!(name_flags & NAME_IS_XATTR))
			errno = ENOENT;
		return 1;
	}

	if (filter_level != ALL_FILTERS)
		return 0;

	if (filter_list.head && check_filter(&filter_list, FINFO, fname, name_flags) < 0)
		return 1;

	return 0;
}