diff options
-rw-r--r-- | lib/utils_base.c | 3 | ||||
-rw-r--r-- | plugins/check_ide_smart.c | 10 | ||||
-rw-r--r-- | plugins/check_tcp.c | 2 | ||||
-rw-r--r-- | plugins/negate.c | 3 | ||||
-rw-r--r-- | plugins/runcmd.h | 12 |
5 files changed, 17 insertions, 13 deletions
diff --git a/lib/utils_base.c b/lib/utils_base.c index 8685e6fe..54463e92 100644 --- a/lib/utils_base.c +++ b/lib/utils_base.c | |||
@@ -27,6 +27,7 @@ | |||
27 | #include "common.h" | 27 | #include "common.h" |
28 | #include <stdarg.h> | 28 | #include <stdarg.h> |
29 | #include "utils_base.h" | 29 | #include "utils_base.h" |
30 | #include <ctype.h> | ||
30 | #include <fcntl.h> | 31 | #include <fcntl.h> |
31 | #include <sys/stat.h> | 32 | #include <sys/stat.h> |
32 | 33 | ||
@@ -34,6 +35,8 @@ | |||
34 | 35 | ||
35 | nagios_plugin *this_nagios_plugin=NULL; | 36 | nagios_plugin *this_nagios_plugin=NULL; |
36 | 37 | ||
38 | int _np_state_read_file(FILE *); | ||
39 | |||
37 | void np_init( char *plugin_name, int argc, char **argv ) { | 40 | void np_init( char *plugin_name, int argc, char **argv ) { |
38 | if (this_nagios_plugin==NULL) { | 41 | if (this_nagios_plugin==NULL) { |
39 | this_nagios_plugin = calloc(1, sizeof(nagios_plugin)); | 42 | this_nagios_plugin = calloc(1, sizeof(nagios_plugin)); |
diff --git a/plugins/check_ide_smart.c b/plugins/check_ide_smart.c index ee6bf7bd..0a8009ab 100644 --- a/plugins/check_ide_smart.c +++ b/plugins/check_ide_smart.c | |||
@@ -164,8 +164,14 @@ enum SmartCommand | |||
164 | SMART_CMD_AUTO_OFFLINE | 164 | SMART_CMD_AUTO_OFFLINE |
165 | }; | 165 | }; |
166 | 166 | ||
167 | void print_values (values_t * p, thresholds_t * t); | 167 | char *get_offline_text (int); |
168 | int smart_cmd_simple (int fd, enum SmartCommand command, __u8 val0, char show_error); | 168 | int smart_read_values (int, values_t *); |
169 | int values_not_passed (values_t *, thresholds_t *); | ||
170 | int nagios (values_t *, thresholds_t *); | ||
171 | void print_value (value_t *, threshold_t *); | ||
172 | void print_values (values_t *, thresholds_t *); | ||
173 | int smart_cmd_simple (int, enum SmartCommand, __u8, char); | ||
174 | int smart_read_thresholds (int, thresholds_t *); | ||
169 | 175 | ||
170 | int | 176 | int |
171 | main (int argc, char *argv[]) | 177 | main (int argc, char *argv[]) |
diff --git a/plugins/check_tcp.c b/plugins/check_tcp.c index b024821e..9e62638b 100644 --- a/plugins/check_tcp.c +++ b/plugins/check_tcp.c | |||
@@ -32,6 +32,8 @@ char *progname; | |||
32 | const char *copyright = "1999-2008"; | 32 | const char *copyright = "1999-2008"; |
33 | const char *email = "nagiosplug-devel@lists.sourceforge.net"; | 33 | const char *email = "nagiosplug-devel@lists.sourceforge.net"; |
34 | 34 | ||
35 | #include <ctype.h> | ||
36 | |||
35 | #include "common.h" | 37 | #include "common.h" |
36 | #include "netutils.h" | 38 | #include "netutils.h" |
37 | #include "utils.h" | 39 | #include "utils.h" |
diff --git a/plugins/negate.c b/plugins/negate.c index 493988ee..ef7d4e03 100644 --- a/plugins/negate.c +++ b/plugins/negate.c | |||
@@ -35,6 +35,8 @@ const char *email = "nagiosplug-devel@lists.sourceforge.net"; | |||
35 | 35 | ||
36 | #define DEFAULT_TIMEOUT 11 | 36 | #define DEFAULT_TIMEOUT 11 |
37 | 37 | ||
38 | #include <ctype.h> | ||
39 | |||
38 | #include "common.h" | 40 | #include "common.h" |
39 | #include "utils.h" | 41 | #include "utils.h" |
40 | #include "utils_cmd.h" | 42 | #include "utils_cmd.h" |
@@ -43,6 +45,7 @@ const char *email = "nagiosplug-devel@lists.sourceforge.net"; | |||
43 | 45 | ||
44 | static const char **process_arguments (int, char **); | 46 | static const char **process_arguments (int, char **); |
45 | int validate_arguments (char **); | 47 | int validate_arguments (char **); |
48 | int translate_state (char *); | ||
46 | void print_help (void); | 49 | void print_help (void); |
47 | void print_usage (void); | 50 | void print_usage (void); |
48 | int subst_text = FALSE; | 51 | int subst_text = FALSE; |
diff --git a/plugins/runcmd.h b/plugins/runcmd.h index 5957562b..fe660673 100644 --- a/plugins/runcmd.h +++ b/plugins/runcmd.h | |||
@@ -25,17 +25,7 @@ | |||
25 | #define NAGIOSPLUG_RUNCMD_H | 25 | #define NAGIOSPLUG_RUNCMD_H |
26 | 26 | ||
27 | #include "common.h" | 27 | #include "common.h" |
28 | 28 | #include "utils_cmd.h" /* for the "output" type */ | |
29 | /** types **/ | ||
30 | struct output { | ||
31 | char *buf; /* output buffer */ | ||
32 | size_t buflen; /* output buffer content length */ | ||
33 | char **line; /* array of lines (points to buf) */ | ||
34 | size_t *lens; /* string lengths */ | ||
35 | size_t lines; /* lines of output */ | ||
36 | }; | ||
37 | |||
38 | typedef struct output output; | ||
39 | 29 | ||
40 | /** prototypes **/ | 30 | /** prototypes **/ |
41 | int np_runcmd(const char *, output *, output *, int); | 31 | int np_runcmd(const char *, output *, output *, int); |