diff options
author | Damien Miller <djm@mindrot.org> | 2002-02-05 12:26:34 +1100 |
---|---|---|
committer | Damien Miller <djm@mindrot.org> | 2002-02-05 12:26:34 +1100 |
commit | fcd9320440c7eb2758659ec2ac19b99054e43044 (patch) | |
tree | bb61ee56c4a5311027d9ac7e593a5f957267ab2f /log.c | |
parent | 9b74bfc5be938d1bf5012c997c463b621c4fbffd (diff) |
- markus@cvs.openbsd.org 2002/02/04 12:15:25
[log.c log.h readconf.c servconf.c]
add SYSLOG_FACILITY_NOT_SET = -1, SYSLOG_LEVEL_NOT_SET = -1,
fixes arm/netbsd; based on patch from bjh21@netbsd.org; ok djm@
Diffstat (limited to 'log.c')
-rw-r--r-- | log.c | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -34,7 +34,7 @@ | |||
34 | */ | 34 | */ |
35 | 35 | ||
36 | #include "includes.h" | 36 | #include "includes.h" |
37 | RCSID("$OpenBSD: log.c,v 1.20 2002/01/17 04:27:37 stevesk Exp $"); | 37 | RCSID("$OpenBSD: log.c,v 1.21 2002/02/04 12:15:25 markus Exp $"); |
38 | 38 | ||
39 | #include "log.h" | 39 | #include "log.h" |
40 | #include "xmalloc.h" | 40 | #include "xmalloc.h" |
@@ -68,7 +68,7 @@ static struct { | |||
68 | { "LOCAL5", SYSLOG_FACILITY_LOCAL5 }, | 68 | { "LOCAL5", SYSLOG_FACILITY_LOCAL5 }, |
69 | { "LOCAL6", SYSLOG_FACILITY_LOCAL6 }, | 69 | { "LOCAL6", SYSLOG_FACILITY_LOCAL6 }, |
70 | { "LOCAL7", SYSLOG_FACILITY_LOCAL7 }, | 70 | { "LOCAL7", SYSLOG_FACILITY_LOCAL7 }, |
71 | { NULL, (SyslogFacility)0 } | 71 | { NULL, SYSLOG_FACILITY_NOT_SET } |
72 | }; | 72 | }; |
73 | 73 | ||
74 | static struct { | 74 | static struct { |
@@ -85,7 +85,7 @@ static struct { | |||
85 | { "DEBUG1", SYSLOG_LEVEL_DEBUG1 }, | 85 | { "DEBUG1", SYSLOG_LEVEL_DEBUG1 }, |
86 | { "DEBUG2", SYSLOG_LEVEL_DEBUG2 }, | 86 | { "DEBUG2", SYSLOG_LEVEL_DEBUG2 }, |
87 | { "DEBUG3", SYSLOG_LEVEL_DEBUG3 }, | 87 | { "DEBUG3", SYSLOG_LEVEL_DEBUG3 }, |
88 | { NULL, (LogLevel)0 } | 88 | { NULL, SYSLOG_LEVEL_NOT_SET } |
89 | }; | 89 | }; |
90 | 90 | ||
91 | static void do_log(LogLevel level, const char *fmt, va_list args); | 91 | static void do_log(LogLevel level, const char *fmt, va_list args); |
@@ -98,7 +98,7 @@ log_facility_number(char *name) | |||
98 | for (i = 0; log_facilities[i].name; i++) | 98 | for (i = 0; log_facilities[i].name; i++) |
99 | if (strcasecmp(log_facilities[i].name, name) == 0) | 99 | if (strcasecmp(log_facilities[i].name, name) == 0) |
100 | return log_facilities[i].val; | 100 | return log_facilities[i].val; |
101 | return (SyslogFacility) - 1; | 101 | return SYSLOG_FACILITY_NOT_SET; |
102 | } | 102 | } |
103 | 103 | ||
104 | LogLevel | 104 | LogLevel |
@@ -109,7 +109,7 @@ log_level_number(char *name) | |||
109 | for (i = 0; log_levels[i].name; i++) | 109 | for (i = 0; log_levels[i].name; i++) |
110 | if (strcasecmp(log_levels[i].name, name) == 0) | 110 | if (strcasecmp(log_levels[i].name, name) == 0) |
111 | return log_levels[i].val; | 111 | return log_levels[i].val; |
112 | return (LogLevel) - 1; | 112 | return SYSLOG_LEVEL_NOT_SET; |
113 | } | 113 | } |
114 | /* Fatal messages. This function never returns. */ | 114 | /* Fatal messages. This function never returns. */ |
115 | 115 | ||