diff options
author | Holger Weiss <holger@zedat.fu-berlin.de> | 2021-10-03 13:37:12 +0200 |
---|---|---|
committer | Holger Weiss <holger@zedat.fu-berlin.de> | 2021-10-03 13:37:12 +0200 |
commit | 2f80d55b8ed0c539a9141895a226c5fec4ff4c4d (patch) | |
tree | 06daa9142183c0f6c6624bebcffd7d11de1ab976 /plugins/utils.h | |
parent | cfc43a327526d838db5ec81f5594df4a14319786 (diff) | |
parent | 46c5327e348540ab04dc37d42f6d1c5408179fa6 (diff) | |
download | monitoring-plugins-2f80d55b8ed0c539a9141895a226c5fec4ff4c4d.tar.gz |
Merge remote-tracking branch 'monitoring-plugins/pr/1707'
* monitoring-plugins/pr/1707:
Revert to poor man's logic
Change all to comments to old comment style
Fix comparing logic
Remove spaces from tests
check_swap: Fix perfdata und thresholds for big values and simplify code
Introduce new perfdata functions and stuff for using (u)int64_t
Diffstat (limited to 'plugins/utils.h')
-rw-r--r-- | plugins/utils.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/plugins/utils.h b/plugins/utils.h index 33a20547..5b54da3c 100644 --- a/plugins/utils.h +++ b/plugins/utils.h | |||
@@ -16,6 +16,7 @@ suite of plugins. */ | |||
16 | /* now some functions etc are being defined in ../lib/utils_base.c */ | 16 | /* now some functions etc are being defined in ../lib/utils_base.c */ |
17 | #include "utils_base.h" | 17 | #include "utils_base.h" |
18 | 18 | ||
19 | |||
19 | #ifdef NP_EXTRA_OPTS | 20 | #ifdef NP_EXTRA_OPTS |
20 | /* Include extra-opts functions if compiled in */ | 21 | /* Include extra-opts functions if compiled in */ |
21 | #include "extra_opts.h" | 22 | #include "extra_opts.h" |
@@ -38,6 +39,8 @@ int is_intpos (char *); | |||
38 | int is_intneg (char *); | 39 | int is_intneg (char *); |
39 | int is_intnonneg (char *); | 40 | int is_intnonneg (char *); |
40 | int is_intpercent (char *); | 41 | int is_intpercent (char *); |
42 | int is_uint64(char *number, uint64_t *target); | ||
43 | int is_int64(char *number, int64_t *target); | ||
41 | 44 | ||
42 | int is_numeric (char *); | 45 | int is_numeric (char *); |
43 | int is_positive (char *); | 46 | int is_positive (char *); |
@@ -88,6 +91,12 @@ void usage_va(const char *fmt, ...) __attribute__((noreturn)); | |||
88 | char *perfdata (const char *, long int, const char *, int, long int, | 91 | char *perfdata (const char *, long int, const char *, int, long int, |
89 | int, long int, int, long int, int, long int); | 92 | int, long int, int, long int, int, long int); |
90 | 93 | ||
94 | char *perfdata_uint64 (const char *, uint64_t , const char *, int, uint64_t, | ||
95 | int, uint64_t, int, uint64_t, int, uint64_t); | ||
96 | |||
97 | char *perfdata_int64 (const char *, int64_t, const char *, int, int64_t, | ||
98 | int, int64_t, int, int64_t, int, int64_t); | ||
99 | |||
91 | char *fperfdata (const char *, double, const char *, int, double, | 100 | char *fperfdata (const char *, double, const char *, int, double, |
92 | int, double, int, double, int, double); | 101 | int, double, int, double, int, double); |
93 | 102 | ||