Add function for printing warnings

This commit is contained in:
Marcel Holtmann 2009-08-12 17:33:44 -07:00
parent 89bbf66ae8
commit 08f6629d60
2 changed files with 20 additions and 0 deletions

View File

@ -34,6 +34,8 @@ extern "C" {
extern void ofono_info(const char *format, ...)
__attribute__((format(printf, 1, 2)));
extern void ofono_warn(const char *format, ...)
__attribute__((format(printf, 1, 2)));
extern void ofono_error(const char *format, ...)
__attribute__((format(printf, 1, 2)));
extern void ofono_debug(const char *format, ...)

View File

@ -48,6 +48,24 @@ void ofono_info(const char *format, ...)
va_end(ap);
}
/**
* ofono_warn:
* @format: format string
* @Varargs: list of arguments
*
* Output warning information
*/
void ofono_warn(const char *format, ...)
{
va_list ap;
va_start(ap, format);
vsyslog(LOG_WARNING, format, ap);
va_end(ap);
}
/**
* ofono_error:
* @format: format string