diff options
author | M. Sean Finney <seanius@users.sourceforge.net> | 2005-10-24 11:10:29 (GMT) |
---|---|---|
committer | M. Sean Finney <seanius@users.sourceforge.net> | 2005-10-24 11:10:29 (GMT) |
commit | ceebd58040b1688749d58dd76963af639cf8c803 (patch) | |
tree | 972deca448413addc597ce7ba3a1a4edefa8c5a5 /plugins/utils.c | |
parent | 19100c883d72e6ebfd3f15b3171ade2a78345c73 (diff) | |
download | monitoring-plugins-ceebd58040b1688749d58dd76963af639cf8c803.tar.gz |
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
Diffstat (limited to 'plugins/utils.c')
-rw-r--r-- | plugins/utils.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/plugins/utils.c b/plugins/utils.c index b9a19d3..8b31c5a 100644 --- a/plugins/utils.c +++ b/plugins/utils.c | |||
@@ -58,6 +58,17 @@ void usage (const char *msg) | |||
58 | exit (STATE_UNKNOWN); | 58 | exit (STATE_UNKNOWN); |
59 | } | 59 | } |
60 | 60 | ||
61 | void usage_va (const char *fmt, ...) | ||
62 | { | ||
63 | va_list ap; | ||
64 | printf("%s: ", progname); | ||
65 | va_start(ap, fmt); | ||
66 | vprintf(fmt, ap); | ||
67 | va_end(ap); | ||
68 | printf("\n"); | ||
69 | exit (STATE_UNKNOWN); | ||
70 | } | ||
71 | |||
61 | void usage2(const char *msg, const char *arg) | 72 | void usage2(const char *msg, const char *arg) |
62 | { | 73 | { |
63 | printf ("%s: %s - %s\n",progname,msg,arg); | 74 | printf ("%s: %s - %s\n",progname,msg,arg); |