From c84df82899a1c70448d6b740531565ba632f0101 Mon Sep 17 00:00:00 2001 From: Henning Brauer Date: Thu, 22 Jan 2004 19:13:57 +0000 Subject: provide log_warnx() and log_info() --- usr.sbin/bgpd/bgpd.h | 4 +++- 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 @@ -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 @@ -220,6 +220,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) { -- cgit v1.2.3