From c0426ff10bc9dbc9c64f3d32995feb9262c82148 Mon Sep 17 00:00:00 2001 From: David Gibson Date: Fri, 13 Oct 2023 15:50:30 +1100 Subject: log: Add vlogmsg() Currently logmsg() is only available as a variadic function. This is fine for normal use, but is awkward if we ever want to write wrappers around it which (for example) add standardised prefix information. To allow that, add a vlogmsg() function which takes a va_list instead, and implement logmsg() in terms of it. Signed-off-by: David Gibson Signed-off-by: Stefano Brivio --- log.h | 1 + 1 file changed, 1 insertion(+) (limited to 'log.h') diff --git a/log.h b/log.h index df72f9a..9c38182 100644 --- a/log.h +++ b/log.h @@ -12,6 +12,7 @@ #define LOGFILE_CUT_RATIO 30 /* When full, cut ~30% size */ #define LOGFILE_SIZE_MIN (5UL * MAX(BUFSIZ, PAGE_SIZE)) +void vlogmsg(int pri, const char *format, va_list ap); void logmsg(int pri, const char *format, ...) __attribute__((format(printf, 2, 3))); -- cgit v1.2.3