drm/linux: Rework ioremap functions
[dragonfly.git] / contrib / tcp_wrappers / fakelog.c
blobd8ba998164216c3c2559257cac3a51756af80170
1 /*
2 * This module intercepts syslog() library calls and redirects their output
3 * to the standard output stream. For interactive testing.
4 *
5 * Author: Wietse Venema, Eindhoven University of Technology, The Netherlands.
6 */
8 #include <stdio.h>
10 #include "mystdarg.h"
12 /* openlog - dummy */
14 /* ARGSUSED */
16 void
17 openlog(name, logopt, facility)
18 char *name;
19 int logopt;
20 int facility;
22 /* void */
25 /* vsyslog - format one record */
27 void
28 vsyslog(severity, fmt, ap)
29 int severity;
30 char *fmt;
31 va_list ap;
33 char buf[BUFSIZ];
35 vprintf(percent_m(buf, fmt), ap);
36 printf("\n");
37 fflush(stdout);
40 /* syslog - format one record */
42 /* VARARGS */
44 void
45 VARARGS(syslog, int, severity)
47 va_list ap;
48 char *fmt;
50 VASTART(ap, int, severity);
51 fmt = va_arg(ap, char *);
52 vsyslog(severity, fmt, ap);
53 VAEND(ap);
56 /* closelog - dummy */
58 void
59 closelog()
61 /* void */