Code

initial merging of ae's np_runcmd code into selected plugins.
[nagiosplug.git] / plugins / utils.c
index b9a19d3fe0c2f8f39d0fd1f5c9bfbd30c1279448..8b31c5a2d2197713f5aa55c7afbdcc8394f68eca 100644 (file)
@@ -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);