summaryrefslogtreecommitdiffstats
path: root/lib/utils_cmd.h
diff options
context:
space:
mode:
authorLorenz Kästle <lorenz.kaestle@netways.de>2024-10-17 17:57:50 +0200
committerLorenz Kästle <lorenz.kaestle@netways.de>2024-10-17 17:57:50 +0200
commitee1ba3209993b72e90f5fe30a16ad951f1e2402d (patch)
tree24b9cb0130f89892ea71562f09197d95c269048c /lib/utils_cmd.h
parent7fb58ce783285a983964d219fff18eba9b12e1e4 (diff)
downloadmonitoring-plugins-ee1ba3209993b72e90f5fe30a16ad951f1e2402d.tar.gz
lib: clang-format
Diffstat (limited to 'lib/utils_cmd.h')
-rw-r--r--lib/utils_cmd.h19
1 files changed, 8 insertions, 11 deletions
diff --git a/lib/utils_cmd.h b/lib/utils_cmd.h
index 061f5d4f..0fc09173 100644
--- a/lib/utils_cmd.h
+++ b/lib/utils_cmd.h
@@ -8,8 +8,7 @@
8 */ 8 */
9 9
10/** types **/ 10/** types **/
11struct output 11struct output {
12{
13 char *buf; /* output buffer */ 12 char *buf; /* output buffer */
14 size_t buflen; /* output buffer content length */ 13 size_t buflen; /* output buffer content length */
15 char **line; /* array of lines (points to buf) */ 14 char **line; /* array of lines (points to buf) */
@@ -20,20 +19,18 @@ struct output
20typedef struct output output; 19typedef struct output output;
21 20
22/** prototypes **/ 21/** prototypes **/
23int cmd_run (const char *, output *, output *, int); 22int cmd_run(const char *, output *, output *, int);
24int cmd_run_array (char *const *, output *, output *, int); 23int cmd_run_array(char *const *, output *, output *, int);
25int cmd_file_read (char *, output *, int); 24int cmd_file_read(char *, output *, int);
26 25
27/* only multi-threaded plugins need to bother with this */ 26/* only multi-threaded plugins need to bother with this */
28void cmd_init (void); 27void cmd_init(void);
29#define CMD_INIT cmd_init() 28#define CMD_INIT cmd_init()
30 29
31/* possible flags for cmd_run()'s fourth argument */ 30/* possible flags for cmd_run()'s fourth argument */
32#define CMD_NO_ARRAYS 0x01 /* don't populate arrays at all */ 31#define CMD_NO_ARRAYS 0x01 /* don't populate arrays at all */
33#define CMD_NO_ASSOC 0x02 /* output.line won't point to buf */ 32#define CMD_NO_ASSOC 0x02 /* output.line won't point to buf */
34
35
36void timeout_alarm_handler (int);
37 33
34void timeout_alarm_handler(int);
38 35
39#endif /* _UTILS_CMD_ */ 36#endif /* _UTILS_CMD_ */