aboutsummaryrefslogtreecommitdiff
path: root/plugins/utils.h.in
diff options
context:
space:
mode:
authorGravatar Subhendu Ghosh <sghosh@users.sourceforge.net> 2002-06-19 05:11:52 +0000
committerGravatar Subhendu Ghosh <sghosh@users.sourceforge.net> 2002-06-19 05:11:52 +0000
commitf4c6f7f09305c1c9916da6ac4f7aadcb31e319e0 (patch)
treebec7f042f90eac26b30122806846fc6a0e3f13b7 /plugins/utils.h.in
parentd36016a7adf28424d7f4adaa50612c41f1937c3b (diff)
downloadmonitoring-plugins-f4c6f7f09305c1c9916da6ac4f7aadcb31e319e0.tar.gz
more POSIX return value comparison related code fixes
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@55 f882894a-f735-0410-b71e-b25c423dba1c
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 a21d63d6..46b152a3 100644
--- a/plugins/utils.h.in
+++ b/plugins/utils.h.in
@@ -1,4 +1,4 @@
-/* header file for nagios plugins uitls.c */
+/* header file for nagios plugins utils.c */
/* this file should be included in all plugins */
@@ -55,6 +55,9 @@ char *ssprintf (char *str, const char *fmt, ...);
char *strpcpy (char *dest, const char *src, const char *str);
char *strpcat (char *dest, const char *src, const char *str);
+/* Handle comparisions for STATE_* */
+int max_state(int, int);
+
#define max(a,b) ((a)>(b))?(a):(b)
#define usage(msg) {\
@@ -73,7 +76,8 @@ exit(STATE_UNKNOWN);\
(a)==0?"OK":\
(a)==1?"WARNING":\
(a)==2?"CRITICAL":\
-(a)==-2?"DEPENDENT":\
+(a)==3?"UNKNOWN":\
+(a)==4?"DEPENDENT":\
"UNKNOWN"
/* The idea here is that, although not every plugin will use all of these,