waffle

user and group backend daemon
git clone git://git.2f30.org/waffle
Log | Files | Refs | LICENSE

commit 62b85cc393d2ed727c241cd5ed86549f252404ae
parent 9f2cfe16d663b248056b82b1d8ed577b02f6cabe
Author: sin <sin@2f30.org>
Date:   Wed, 11 Mar 2015 18:42:15 +0000

Add loginfo()

Diffstat:
Mutil.c | 12++++++++++++
Mwaffle.h | 1+
2 files changed, 13 insertions(+), 0 deletions(-)

diff --git a/util.c b/util.c @@ -5,6 +5,18 @@ #include "waffle.h" void +loginfo(const char *fmt, ...) +{ + va_list ap; + va_start(ap, fmt); + if (daemonize == 1) + vsyslog(LOG_INFO, fmt, ap); + else + vfprintf(stderr, fmt, ap); + va_end(ap); +} + +void logwarn(const char *fmt, ...) { va_list ap; diff --git a/waffle.h b/waffle.h @@ -34,5 +34,6 @@ int backends_grbyname(const char *, struct group *); int backends_grbygid(const char *, struct group *); /* util.c */ +void loginfo(const char *, ...); void logwarn(const char *, ...); void logerr(const char *, ...);