diff options
| author | Lorenz Kästle <12514511+RincewindsHat@users.noreply.github.com> | 2024-10-31 14:58:50 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-10-31 14:58:50 +0100 |
| commit | 87eb2bef1ee2a6a42793437b2f5d63f41b1e1806 (patch) | |
| tree | 9513fdfe66af00b7332fd1578f50af8403e64371 /lib/utils_cmd.h | |
| parent | b1d260a821b7d4916d6bf1a026fbc9b4f2b268ae (diff) | |
| parent | 7d90b8200f709d125df19fa6aedf633c64b88ad4 (diff) | |
| download | monitoring-plugins-87eb2bef1ee2a6a42793437b2f5d63f41b1e1806.tar.gz | |
Merge pull request #2034 from RincewindsHat/cleanup/lib
Cleanup/lib
Diffstat (limited to 'lib/utils_cmd.h')
| -rw-r--r-- | lib/utils_cmd.h | 20 |
1 files changed, 8 insertions, 12 deletions
diff --git a/lib/utils_cmd.h b/lib/utils_cmd.h index 061f5d4f..d00069c9 100644 --- a/lib/utils_cmd.h +++ b/lib/utils_cmd.h | |||
| @@ -4,12 +4,10 @@ | |||
| 4 | /* | 4 | /* |
| 5 | * Header file for Monitoring Plugins utils_cmd.c | 5 | * Header file for Monitoring Plugins utils_cmd.c |
| 6 | * | 6 | * |
| 7 | * | ||
| 8 | */ | 7 | */ |
| 9 | 8 | ||
| 10 | /** types **/ | 9 | /** types **/ |
| 11 | struct output | 10 | struct output { |
| 12 | { | ||
| 13 | char *buf; /* output buffer */ | 11 | char *buf; /* output buffer */ |
| 14 | size_t buflen; /* output buffer content length */ | 12 | size_t buflen; /* output buffer content length */ |
| 15 | char **line; /* array of lines (points to buf) */ | 13 | char **line; /* array of lines (points to buf) */ |
| @@ -20,20 +18,18 @@ struct output | |||
| 20 | typedef struct output output; | 18 | typedef struct output output; |
| 21 | 19 | ||
| 22 | /** prototypes **/ | 20 | /** prototypes **/ |
| 23 | int cmd_run (const char *, output *, output *, int); | 21 | int cmd_run(const char *, output *, output *, int); |
| 24 | int cmd_run_array (char *const *, output *, output *, int); | 22 | int cmd_run_array(char *const *, output *, output *, int); |
| 25 | int cmd_file_read (char *, output *, int); | 23 | int cmd_file_read(char *, output *, int); |
| 26 | 24 | ||
| 27 | /* only multi-threaded plugins need to bother with this */ | 25 | /* only multi-threaded plugins need to bother with this */ |
| 28 | void cmd_init (void); | 26 | void cmd_init(void); |
| 29 | #define CMD_INIT cmd_init() | 27 | #define CMD_INIT cmd_init() |
| 30 | 28 | ||
| 31 | /* possible flags for cmd_run()'s fourth argument */ | 29 | /* possible flags for cmd_run()'s fourth argument */ |
| 32 | #define CMD_NO_ARRAYS 0x01 /* don't populate arrays at all */ | 30 | #define CMD_NO_ARRAYS 0x01 /* don't populate arrays at all */ |
| 33 | #define CMD_NO_ASSOC 0x02 /* output.line won't point to buf */ | 31 | #define CMD_NO_ASSOC 0x02 /* output.line won't point to buf */ |
| 34 | |||
| 35 | |||
| 36 | void timeout_alarm_handler (int); | ||
| 37 | 32 | ||
| 33 | void timeout_alarm_handler(int); | ||
| 38 | 34 | ||
| 39 | #endif /* _UTILS_CMD_ */ | 35 | #endif /* _UTILS_CMD_ */ |
