summaryrefslogtreecommitdiffstats
path: root/plugins/utils.h
diff options
context:
space:
mode:
authorBenoit Mortier <opensides@users.sourceforge.net>2004-12-05 00:54:09 (GMT)
committerBenoit Mortier <opensides@users.sourceforge.net>2004-12-05 00:54:09 (GMT)
commit2ab4d8fc278413b01ff9c4e4496f892398f80a4c (patch)
tree6d402f5bf1b4673d00f97bbb84b1ea6b4badd060 /plugins/utils.h
parente9e1fe6ef5720adf355b605ffdbe94cd608cc46c (diff)
downloadmonitoring-plugins-2ab4d8fc278413b01ff9c4e4496f892398f80a4c.tar.gz
fix patch 998291
fix patch 1078934 expect check_ssh fix and check_nt perfdata should stay on one word like in nagios git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1004 f882894a-f735-0410-b71e-b25c423dba1c
Diffstat (limited to 'plugins/utils.h')
-rw-r--r--plugins/utils.h71
1 files changed, 36 insertions, 35 deletions
diff --git a/plugins/utils.h b/plugins/utils.h
index 4fc1305..bdf1ee1 100644
--- a/plugins/utils.h
+++ b/plugins/utils.h
@@ -16,9 +16,9 @@ suite of plugins. */
16/* $Id$ */ 16/* $Id$ */
17 17
18void support (void); 18void support (void);
19char *clean_revstring (const char *revstring); 19char *clean_revstring (const char *);
20void print_revision (const char *, const char *); 20void print_revision (const char *, const char *);
21void die (int result, const char *fmt, ...) __attribute__((noreturn,format(printf, 2, 3))); 21void die (int, const char *, ...) __attribute__((noreturn,format(printf, 2, 3)));
22 22
23/* Handle timeouts */ 23/* Handle timeouts */
24 24
@@ -57,7 +57,7 @@ struct timeval {
57#endif 57#endif
58 58
59#ifndef HAVE_GETTIMEOFDAY 59#ifndef HAVE_GETTIMEOFDAY
60int gettimeofday(struct timeval *tv, struct timezone *tz); 60int gettimeofday(struct timeval *, struct timezone *);
61#endif 61#endif
62 62
63double delta_time (struct timeval tv); 63double delta_time (struct timeval tv);
@@ -65,46 +65,47 @@ long deltime (struct timeval tv);
65 65
66/* Handle strings safely */ 66/* Handle strings safely */
67 67
68void strip (char *buffer); 68void strip (char *);
69char *strscpy (char *dest, const char *src); 69char *strscpy (char *, const char *);
70char *strnl (char *str); 70char *strnl (char *);
71char *strpcpy (char *dest, const char *src, const char *str); 71char *strpcpy (char *, const char *, const char *);
72char *strpcat (char *dest, const char *src, const char *str); 72char *strpcat (char *, const char *, const char *);
73 73
74int max_state (int a, int b); 74int max_state (int a, int b);
75 75
76void usage (const char *msg) __attribute__((noreturn)); 76void usage (const char *) __attribute__((noreturn));
77void usage2(const char *msg, const char *arg) __attribute__((noreturn)); 77void usage2(const char *, const char *) __attribute__((noreturn));
78void usage3(const char *msg, int arg) __attribute__((noreturn)); 78void usage3(const char *, int) __attribute__((noreturn));
79void usage4(const char *);
79 80
80const char *state_text (int result); 81const char *state_text (int);
81 82
82#define max(a,b) (((a)>(b))?(a):(b)) 83#define max(a,b) (((a)>(b))?(a):(b))
83#define min(a,b) (((a)<(b))?(a):(b)) 84#define min(a,b) (((a)<(b))?(a):(b))
84 85
85char *perfdata (const char *label, 86char *perfdata (const char *,
86 long int val, 87 long int,
87 const char *uom, 88 const char *,
88 int warnp, 89 int,
89 long int warn, 90 long int,
90 int critp, 91 int,
91 long int crit, 92 long int,
92 int minp, 93 int,
93 long int minv, 94 long int,
94 int maxp, 95 int,
95 long int maxv); 96 long int);
96 97
97char *fperfdata (const char *label, 98char *fperfdata (const char *,
98 double val, 99 double,
99 const char *uom, 100 const char *,
100 int warnp, 101 int,
101 double warn, 102 double,
102 int critp, 103 int,
103 double crit, 104 double,
104 int minp, 105 int,
105 double minv, 106 double,
106 int maxp, 107 int,
107 double maxv); 108 double);
108 109
109/* The idea here is that, although not every plugin will use all of these, 110/* The idea here is that, although not every plugin will use all of these,
110 most will or should. Therefore, for consistency, these very common 111 most will or should. Therefore, for consistency, these very common