static void memcache_tpl_fatal(char *fmt, ...) { va_list ap; va_start(ap, fmt); pr_trace_vmsg(trace_channel, 1, fmt, ap); va_end(ap); _exit(1); }
int pr_trace_msg(const char *channel, int level, const char *fmt, ...) { int res; va_list msg; va_start(msg, fmt); res = pr_trace_vmsg(channel, level, fmt, msg); va_end(msg); return res; }
static int memcache_tpl_oops(const char *fmt, ...) { va_list ap; va_start(ap, fmt); pr_trace_vmsg(trace_channel, 1, fmt, ap); va_end(ap); /* XXX Does tpl check the return value of its oops() hook? */ return 0; }
int pr_trace_msg(const char *channel, int level, const char *fmt, ...) { int res; va_list msg; if (channel == NULL || fmt == NULL || level <= 0) { errno = EINVAL; return -1; } /* If no one's listening... */ if (pr_log_event_listening(PR_LOG_TYPE_TRACELOG) <= 0 && trace_logfd < 0) { return 0; } va_start(msg, fmt); res = pr_trace_vmsg(channel, level, fmt, msg); va_end(msg); return res; }