diff options
author | Benoit Mortier <opensides@users.sourceforge.net> | 2004-12-05 00:54:09 +0000 |
---|---|---|
committer | Benoit Mortier <opensides@users.sourceforge.net> | 2004-12-05 00:54:09 +0000 |
commit | 2ab4d8fc278413b01ff9c4e4496f892398f80a4c (patch) | |
tree | 6d402f5bf1b4673d00f97bbb84b1ea6b4badd060 /plugins/utils.h | |
parent | e9e1fe6ef5720adf355b605ffdbe94cd608cc46c (diff) | |
download | monitoring-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.h | 71 |
1 files changed, 36 insertions, 35 deletions
diff --git a/plugins/utils.h b/plugins/utils.h index 4fc1305f..bdf1ee1f 100644 --- a/plugins/utils.h +++ b/plugins/utils.h | |||
@@ -16,9 +16,9 @@ suite of plugins. */ | |||
16 | /* $Id$ */ | 16 | /* $Id$ */ |
17 | 17 | ||
18 | void support (void); | 18 | void support (void); |
19 | char *clean_revstring (const char *revstring); | 19 | char *clean_revstring (const char *); |
20 | void print_revision (const char *, const char *); | 20 | void print_revision (const char *, const char *); |
21 | void die (int result, const char *fmt, ...) __attribute__((noreturn,format(printf, 2, 3))); | 21 | void 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 |
60 | int gettimeofday(struct timeval *tv, struct timezone *tz); | 60 | int gettimeofday(struct timeval *, struct timezone *); |
61 | #endif | 61 | #endif |
62 | 62 | ||
63 | double delta_time (struct timeval tv); | 63 | double 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 | ||
68 | void strip (char *buffer); | 68 | void strip (char *); |
69 | char *strscpy (char *dest, const char *src); | 69 | char *strscpy (char *, const char *); |
70 | char *strnl (char *str); | 70 | char *strnl (char *); |
71 | char *strpcpy (char *dest, const char *src, const char *str); | 71 | char *strpcpy (char *, const char *, const char *); |
72 | char *strpcat (char *dest, const char *src, const char *str); | 72 | char *strpcat (char *, const char *, const char *); |
73 | 73 | ||
74 | int max_state (int a, int b); | 74 | int max_state (int a, int b); |
75 | 75 | ||
76 | void usage (const char *msg) __attribute__((noreturn)); | 76 | void usage (const char *) __attribute__((noreturn)); |
77 | void usage2(const char *msg, const char *arg) __attribute__((noreturn)); | 77 | void usage2(const char *, const char *) __attribute__((noreturn)); |
78 | void usage3(const char *msg, int arg) __attribute__((noreturn)); | 78 | void usage3(const char *, int) __attribute__((noreturn)); |
79 | void usage4(const char *); | ||
79 | 80 | ||
80 | const char *state_text (int result); | 81 | const 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 | ||
85 | char *perfdata (const char *label, | 86 | char *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 | ||
97 | char *fperfdata (const char *label, | 98 | char *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 |