inotify_fd = inotify_init1(IN_NONBLOCK | IN_CLOEXEC);
if (inotify_fd == -1) {
- syslog_critical_failure("DLog: inotify_init failed (%d)", errno);
- return;
+ syslog_critical_failure("DLog: inotify_init failed (%d)", errno);// LCOV_EXCL_LINE
+ return;// LCOV_EXCL_LINE
}
inotify_wd = inotify_add_watch(inotify_fd, path, IN_CREATE | IN_CLOSE_WRITE | IN_MOVE | IN_DELETE);
if (inotify_wd == -1) {
- syslog_critical_failure("DLog: inotify_add_watch failed (%d)", errno);
- close(inotify_fd);
- inotify_fd = -1;
- return;
+ syslog_critical_failure("DLog: inotify_add_watch failed (%d)", errno);// LCOV_EXCL_LINE
+ close(inotify_fd);// LCOV_EXCL_LINE
+ inotify_fd = -1;// LCOV_EXCL_LINE
+ return;// LCOV_EXCL_LINE
}
}
if (!r)
__log_limiter_update(&config);
else
- syslog_critical_failure("DLog: keeping current runtime filters, can't read from \"%s\" (%d)", inotify_path, -r);
+ syslog_critical_failure("DLog: keeping current runtime filters, can't read from \"%s\" (%d)", inotify_path, -r);// LCOV_EXCL_LINE
log_config_free(&config);
}
return;
if (asprintf(&inotify_path, "%s/%s", extra_filters_path, DYNAMIC_FILTERS_FILENAME) < 0) {
- inotify_path = NULL;
- syslog_critical_failure("DLog: out of memory");
- return;
+ inotify_path = NULL;// LCOV_EXCL_LINE
+ syslog_critical_failure("DLog: out of memory");// LCOV_EXCL_LINE
+ return;// LCOV_EXCL_LINE
}
/* missing filters config file at startup
}
}
- return '?';
+ return '?';// LCOV_EXCL_LINE
}
/* The key is built from TAG and priority by DJB algorithm (Dan Bernstein).
const int r = __log_limiter_initialize(original_rules_table); // LCOV_EXCL_LINE
if (r)
- rules_destroy(&original_rules_table);
+ rules_destroy(&original_rules_table);// LCOV_EXCL_LINE
return !r;
}
-
+// LCOV_EXCL_START
void __log_limiter_update(struct log_config *config)
{
assert(config);
*r = ruleptr->prev;
return 0;
}
+// LCOV_EXCL_END