summaryrefslogtreecommitdiffstats
path: root/plugins/utils.h.in
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/utils.h.in')
-rw-r--r--plugins/utils.h.in8
1 files changed, 6 insertions, 2 deletions
diff --git a/plugins/utils.h.in b/plugins/utils.h.in
index a21d63d..46b152a 100644
--- a/plugins/utils.h.in
+++ b/plugins/utils.h.in
@@ -1,4 +1,4 @@
1/* header file for nagios plugins uitls.c */ 1/* header file for nagios plugins utils.c */
2 2
3/* this file should be included in all plugins */ 3/* this file should be included in all plugins */
4 4
@@ -55,6 +55,9 @@ char *ssprintf (char *str, const char *fmt, ...);
55char *strpcpy (char *dest, const char *src, const char *str); 55char *strpcpy (char *dest, const char *src, const char *str);
56char *strpcat (char *dest, const char *src, const char *str); 56char *strpcat (char *dest, const char *src, const char *str);
57 57
58/* Handle comparisions for STATE_* */
59int max_state(int, int);
60
58#define max(a,b) ((a)>(b))?(a):(b) 61#define max(a,b) ((a)>(b))?(a):(b)
59 62
60#define usage(msg) {\ 63#define usage(msg) {\
@@ -73,7 +76,8 @@ exit(STATE_UNKNOWN);\
73(a)==0?"OK":\ 76(a)==0?"OK":\
74(a)==1?"WARNING":\ 77(a)==1?"WARNING":\
75(a)==2?"CRITICAL":\ 78(a)==2?"CRITICAL":\
76(a)==-2?"DEPENDENT":\ 79(a)==3?"UNKNOWN":\
80(a)==4?"DEPENDENT":\
77"UNKNOWN" 81"UNKNOWN"
78 82
79/* The idea here is that, although not every plugin will use all of these, 83/* The idea here is that, although not every plugin will use all of these,