[PATCH 1/2] Add function for printing warnings

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Chan-yeol Park <chanyeol.park@xxxxxxxxxxx>

---
 src/log.c |   12 ++++++++++++
 src/log.h |    1 +
 2 files changed, 13 insertions(+), 0 deletions(-)

diff --git a/src/log.c b/src/log.c
index 4a50117..adbfba9 100644
--- a/src/log.c
+++ b/src/log.c
@@ -55,6 +55,18 @@ void error(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 btd_debug(const char *format, ...)
 {
 	va_list ap;
diff --git a/src/log.h b/src/log.h
index 51c52e6..cdcb146 100644
--- a/src/log.h
+++ b/src/log.h
@@ -23,6 +23,7 @@
 
 void info(const char *format, ...) __attribute__((format(printf, 1, 2)));
 void error(const char *format, ...) __attribute__((format(printf, 1, 2)));
+void warn(const char *format, ...) __attribute__((format(printf, 1, 2)));
 
 void btd_debug(const char *format, ...) __attribute__((format(printf, 1, 2)));
 
-- 
1.7.5.4

--
To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux