Sync usage with man page.
[netbsd-mini2440.git] / distrib / utils / libhack / syslog.c
blob81263a3ea6176ee71e7a8757886ed8833695d9db
1 #include <sys/types.h>
2 #include <sys/syslog.h>
3 #include <stdio.h>
4 #include <stdarg.h>
6 void
7 openlog(const char *path, int opt, int fac)
11 void
12 closelog(void)
16 int
17 setlogmask(int mask)
19 return 0xff;
22 __strong_alias(_syslog, syslog)
23 void
24 syslog(int fac, const char *fmt, ...)
26 va_list ap;
27 va_start(ap, fmt);
28 (void)vfprintf(stderr, fmt, ap);
29 va_end(ap);
30 (void)fprintf(stderr, "\n");
31 fflush(stderr);
34 __strong_alias(_vsyslog, vsyslog)
35 void
36 vsyslog(int fac, const char *fmt, va_list ap)
38 (void)vfprintf(stderr, fmt, ap);
39 (void)fprintf(stderr, "\n");
40 fflush(stderr);
43 void syslog_ss(int, struct syslog_data *, const char *, ...);
44 __strong_alias(_syslog_ss, syslog_ss)
45 void
46 syslog_ss(int priority, struct syslog_data *data, const char *fmt, ...)
48 va_list ap;
49 va_start(ap, fmt);
50 vsyslog(priority, fmt, ap);
51 va_end(ap);
54 void vsyslog_ss(int, struct syslog_data *, const char *, va_list);
55 __strong_alias(_vsyslog_ss, vsyslog_ss)
56 void
57 vsyslog_ss(int priority, struct syslog_data *data, const char *fmt, va_list ap)
59 vsyslog(priority, fmt, ap);
62 __strong_alias(_syslog_r, syslog_r)
63 void
64 syslog_r(int priority, struct syslog_data *data, const char *fmt, ...)
66 va_list ap;
67 va_start(ap, fmt);
68 vsyslog(priority, fmt, ap);
69 va_end(ap);
72 __strong_alias(_vsyslog_r, vsyslog_r)
73 void
74 vsyslog_r(int priority, struct syslog_data *data, const char *fmt, va_list ap)
76 vsyslog(priority, fmt, ap);
79 __strong_alias(_closelog_r, closelog_r)
80 void
81 closelog_r(struct syslog_data *data)
85 __strong_alias(_setlogmask_r, setlogmask_r)
86 int
87 setlogmask_r(int maskpri, struct syslog_data *data)
89 return 0xff;
92 __strong_alias(_openlog_r, openlog_r)
93 void
94 openlog_r(const char *id, int logopt, int facility, struct syslog_data *data)