diff options
Diffstat (limited to 'p11-kit/util.c')
-rw-r--r-- | p11-kit/util.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/p11-kit/util.c b/p11-kit/util.c index e4b0f49..7ea125f 100644 --- a/p11-kit/util.c +++ b/p11-kit/util.c @@ -37,10 +37,13 @@ #include "config.h" #include "p11-kit.h" +#include "private.h" #include "util.h" #include <assert.h> +#include <stdarg.h> #include <stdlib.h> +#include <stdio.h> #include <string.h> void* @@ -123,3 +126,17 @@ p11_kit_space_strdup (const unsigned char *string, size_t max_length) result[length] = 0; return result; } + +void +_p11_warning (const char* msg, ...) +{ + char buffer[512]; + va_list va; + + va_start (va, msg); + vsnprintf (buffer, sizeof (buffer) - 1, msg, va); + va_end (va); + + buffer[sizeof (buffer) - 1] = 0; + fprintf (stderr, "p11-kit: %s\n", buffer); +} |