diff options
author | Chan-yeol Park <chanyeol.park@samsung.com> | 2012-04-16 20:56:32 +0900 |
---|---|---|
committer | Johan Hedberg <johan.hedberg@intel.com> | 2012-04-16 22:53:01 +0300 |
commit | 8434b7c7726d226ea9d3247d55daefd6e070684a (patch) | |
tree | 16cd8e2d90bcbeb7732ee9095e20a182d473b51c | |
parent | 84156dadb25ec0973752d34d84fc9ffb3c720988 (diff) | |
download | bluez-8434b7c7726d226ea9d3247d55daefd6e070684a.tar.gz |
src: Add function for printing warnings
-rw-r--r-- | src/log.c | 11 | ||||
-rw-r--r-- | src/log.h | 1 |
2 files changed, 12 insertions, 0 deletions
@@ -44,6 +44,17 @@ void info(const char *format, ...) va_end(ap); } +void warn(const char *format, ...) +{ + va_list ap; + + va_start(ap, format); + + vsyslog(LOG_WARNING, format, ap); + + va_end(ap); +} + void error(const char *format, ...) { va_list ap; @@ -22,6 +22,7 @@ */ void info(const char *format, ...) __attribute__((format(printf, 1, 2))); +void warn(const char *format, ...) __attribute__((format(printf, 1, 2))); void error(const char *format, ...) __attribute__((format(printf, 1, 2))); void btd_debug(const char *format, ...) __attribute__((format(printf, 1, 2))); |