Lines Matching refs:filt

154 	struct log_filter *filt;  in log_passes_filters()  local
166 list_for_each_entry(filt, &ldev->filter_head, sibling_node) { in log_passes_filters()
167 if (filt->flags & LOGFF_LEVEL_MIN) { in log_passes_filters()
168 if (rec->level < filt->level) in log_passes_filters()
170 } else if (rec->level > filt->level) { in log_passes_filters()
174 if ((filt->flags & LOGFF_HAS_CAT) && in log_passes_filters()
175 !log_has_cat(filt->cat_list, rec->cat)) in log_passes_filters()
178 if (filt->file_list && in log_passes_filters()
179 !log_has_file(filt->file_list, rec->file)) in log_passes_filters()
182 if (filt->flags & LOGFF_DENY) in log_passes_filters()
283 struct log_filter *filt; in log_add_filter_flags() local
291 filt = calloc(1, sizeof(*filt)); in log_add_filter_flags()
292 if (!filt) in log_add_filter_flags()
295 filt->flags = flags; in log_add_filter_flags()
297 filt->flags |= LOGFF_HAS_CAT; in log_add_filter_flags()
299 if (i == ARRAY_SIZE(filt->cat_list)) { in log_add_filter_flags()
303 filt->cat_list[i] = cat_list[i]; in log_add_filter_flags()
308 filt->level = level; in log_add_filter_flags()
310 filt->file_list = strdup(file_list); in log_add_filter_flags()
311 if (!filt->file_list) { in log_add_filter_flags()
316 filt->filter_num = ldev->next_filter_num++; in log_add_filter_flags()
319 list_add(&filt->sibling_node, &ldev->filter_head); in log_add_filter_flags()
321 list_add_tail(&filt->sibling_node, &ldev->filter_head); in log_add_filter_flags()
323 return filt->filter_num; in log_add_filter_flags()
326 free(filt); in log_add_filter_flags()
332 struct log_filter *filt; in log_remove_filter() local
339 list_for_each_entry(filt, &ldev->filter_head, sibling_node) { in log_remove_filter()
340 if (filt->filter_num == filter_num) { in log_remove_filter()
341 list_del(&filt->sibling_node); in log_remove_filter()
342 free(filt); in log_remove_filter()