Lines Matching refs:ldev
89 struct log_device *ldev; in log_device_find_by_name() local
91 list_for_each_entry(ldev, &gd->log_head, sibling_node) { in log_device_find_by_name()
92 if (!strcmp(drv_name, ldev->drv->name)) in log_device_find_by_name()
93 return ldev; in log_device_find_by_name()
152 static bool log_passes_filters(struct log_device *ldev, struct log_rec *rec) in log_passes_filters() argument
157 if (list_empty(&ldev->filter_head)) { in log_passes_filters()
163 list_for_each_entry(filt, &ldev->filter_head, sibling_node) { in log_passes_filters()
189 struct log_device *ldev; in log_dispatch() local
191 list_for_each_entry(ldev, &gd->log_head, sibling_node) { in log_dispatch()
192 if (log_passes_filters(ldev, rec)) in log_dispatch()
193 ldev->drv->emit(ldev, rec); in log_dispatch()
229 struct log_device *ldev; in log_add_filter() local
233 ldev = log_device_find_by_name(drv_name); in log_add_filter()
234 if (!ldev) in log_add_filter()
260 filt->filter_num = ldev->next_filter_num++; in log_add_filter()
261 list_add_tail(&filt->sibling_node, &ldev->filter_head); in log_add_filter()
273 struct log_device *ldev; in log_remove_filter() local
275 ldev = log_device_find_by_name(drv_name); in log_remove_filter()
276 if (!ldev) in log_remove_filter()
279 list_for_each_entry(filt, &ldev->filter_head, sibling_node) { in log_remove_filter()
304 struct log_device *ldev; in log_init() local
306 ldev = calloc(1, sizeof(*ldev)); in log_init()
307 if (!ldev) { in log_init()
311 INIT_LIST_HEAD(&ldev->filter_head); in log_init()
312 ldev->drv = drv; in log_init()
313 list_add_tail(&ldev->sibling_node, in log_init()