aboutsummaryrefslogtreecommitdiff
path: root/plugins/utils.c
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/utils.c')
-rw-r--r--plugins/utils.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/plugins/utils.c b/plugins/utils.c
index b9a19d3f..8b31c5a2 100644
--- a/plugins/utils.c
+++ b/plugins/utils.c
@@ -58,6 +58,17 @@ void usage (const char *msg)
exit (STATE_UNKNOWN);
}
+void usage_va (const char *fmt, ...)
+{
+ va_list ap;
+ printf("%s: ", progname);
+ va_start(ap, fmt);
+ vprintf(fmt, ap);
+ va_end(ap);
+ printf("\n");
+ exit (STATE_UNKNOWN);
+}
+
void usage2(const char *msg, const char *arg)
{
printf ("%s: %s - %s\n",progname,msg,arg);