aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChan-yeol Park <chanyeol.park@samsung.com>2012-04-16 20:56:32 +0900
committerJohan Hedberg <johan.hedberg@intel.com>2012-04-16 22:53:01 +0300
commit8434b7c7726d226ea9d3247d55daefd6e070684a (patch)
tree16cd8e2d90bcbeb7732ee9095e20a182d473b51c
parent84156dadb25ec0973752d34d84fc9ffb3c720988 (diff)
downloadbluez-8434b7c7726d226ea9d3247d55daefd6e070684a.tar.gz
bluez-8434b7c7726d226ea9d3247d55daefd6e070684a.tar.xz
bluez-8434b7c7726d226ea9d3247d55daefd6e070684a.zip
src: Add function for printing warnings
-rw-r--r--src/log.c11
-rw-r--r--src/log.h1
2 files changed, 12 insertions, 0 deletions
diff --git a/src/log.c b/src/log.c
index 4a50117b..75a98a93 100644
--- a/src/log.c
+++ b/src/log.c
@@ -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;
diff --git a/src/log.h b/src/log.h
index 51c52e66..3d34fa37 100644
--- a/src/log.h
+++ b/src/log.h
@@ -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)));