From ceebd58040b1688749d58dd76963af639cf8c803 Mon Sep 17 00:00:00 2001 From: "M. Sean Finney" Date: Mon, 24 Oct 2005 11:10:29 +0000 Subject: initial merging of ae's np_runcmd code into selected plugins. git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1260 f882894a-f735-0410-b71e-b25c423dba1c --- plugins/utils.c | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'plugins/utils.c') 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); -- cgit v1.2.3