diff options
author | Henning Brauer <henning@cvs.openbsd.org> | 2004-01-22 19:13:57 +0000 |
---|---|---|
committer | Henning Brauer <henning@cvs.openbsd.org> | 2004-01-22 19:13:57 +0000 |
commit | c84df82899a1c70448d6b740531565ba632f0101 (patch) | |
tree | 4e22dbdaf25ccaa286690bb219c1fa74d1ca7042 | |
parent | 1957879869158db7f6b1660c4b962537bd81f6e5 (diff) |
provide log_warnx() and log_info()
-rw-r--r-- | usr.sbin/bgpd/bgpd.h | 4 | ||||
-rw-r--r-- | usr.sbin/bgpd/log.c | 22 |
2 files changed, 24 insertions, 2 deletions
diff --git a/usr.sbin/bgpd/bgpd.h b/usr.sbin/bgpd/bgpd.h index f3d9db54318..35e8fc47f40 100644 --- a/usr.sbin/bgpd/bgpd.h +++ b/usr.sbin/bgpd/bgpd.h @@ -1,4 +1,4 @@ -/* $OpenBSD: bgpd.h,v 1.75 2004/01/22 03:18:03 henning Exp $ */ +/* $OpenBSD: bgpd.h,v 1.76 2004/01/22 19:13:56 henning Exp $ */ /* * Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org> @@ -285,6 +285,8 @@ void log_init(int); void logit(int, const char *, ...); void vlog(int, const char *, va_list); void log_warn(const char *, ...); +void log_warnx(const char *, ...); +void log_info(const char *, ...); void fatal(const char *); void fatalx(const char *); void fatal_ensure(const char *, int, const char *); diff --git a/usr.sbin/bgpd/log.c b/usr.sbin/bgpd/log.c index 91d28642e03..d36f855b7d7 100644 --- a/usr.sbin/bgpd/log.c +++ b/usr.sbin/bgpd/log.c @@ -1,4 +1,4 @@ -/* $OpenBSD: log.c,v 1.18 2004/01/22 19:07:33 henning Exp $ */ +/* $OpenBSD: log.c,v 1.19 2004/01/22 19:13:56 henning Exp $ */ /* * Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org> @@ -221,6 +221,26 @@ log_warn(const char *emsg, ...) } void +log_warnx(const char *emsg, ...) +{ + va_list ap; + + va_start(ap, emsg); + vlog(LOG_CRIT, emsg, ap); + va_end(ap); +} + +void +log_info(const char *emsg, ...) +{ + va_list ap; + + va_start(ap, emsg); + vlog(LOG_INFO, emsg, ap); + va_end(ap); +} + +void fatal(const char *emsg) { if (emsg == NULL) |