diff options
author | Lorenz Kästle <12514511+RincewindsHat@users.noreply.github.com> | 2025-03-11 16:18:24 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-03-11 16:18:24 +0100 |
commit | df1257871644dafb793ec7ce4dabccdbda8297d0 (patch) | |
tree | ad48fb7bc725c2d50aface6454c60a4c52a8a1e0 /plugins/check_mrtgtraf.c | |
parent | f22756ba44fd258f486c88fa32dd0bcc954bf09d (diff) | |
parent | 69c61625e4f8977cb06a2514a26fc5805f29c531 (diff) | |
download | monitoring-plugins-df1257871644dafb793ec7ce4dabccdbda8297d0.tar.gz |
Merge pull request #2092 from RincewindsHat/fix/check_mrtgtraf_paths
typo: mrtgraf -> mrtgtraf
Diffstat (limited to 'plugins/check_mrtgtraf.c')
-rw-r--r-- | plugins/check_mrtgtraf.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/plugins/check_mrtgtraf.c b/plugins/check_mrtgtraf.c index c9e26099..8c7cf8aa 100644 --- a/plugins/check_mrtgtraf.c +++ b/plugins/check_mrtgtraf.c | |||
@@ -33,16 +33,16 @@ const char *progname = "check_mrtgtraf"; | |||
33 | const char *copyright = "1999-2024"; | 33 | const char *copyright = "1999-2024"; |
34 | const char *email = "devel@monitoring-plugins.org"; | 34 | const char *email = "devel@monitoring-plugins.org"; |
35 | 35 | ||
36 | #include "check_mrtgraf.d/config.h" | 36 | #include "check_mrtgtraf.d/config.h" |
37 | #include "common.h" | 37 | #include "common.h" |
38 | #include "utils.h" | 38 | #include "utils.h" |
39 | 39 | ||
40 | typedef struct { | 40 | typedef struct { |
41 | int errorcode; | 41 | int errorcode; |
42 | check_mrtgraf_config config; | 42 | check_mrtgtraf_config config; |
43 | } check_mrtgraf_config_wrapper; | 43 | } check_mrtgtraf_config_wrapper; |
44 | 44 | ||
45 | static check_mrtgraf_config_wrapper process_arguments(int /*argc*/, char ** /*argv*/); | 45 | static check_mrtgtraf_config_wrapper process_arguments(int /*argc*/, char ** /*argv*/); |
46 | static void print_help(void); | 46 | static void print_help(void); |
47 | void print_usage(void); | 47 | void print_usage(void); |
48 | 48 | ||
@@ -54,12 +54,12 @@ int main(int argc, char **argv) { | |||
54 | /* Parse extra opts if any */ | 54 | /* Parse extra opts if any */ |
55 | argv = np_extra_opts(&argc, argv, progname); | 55 | argv = np_extra_opts(&argc, argv, progname); |
56 | 56 | ||
57 | check_mrtgraf_config_wrapper tmp_config = process_arguments(argc, argv); | 57 | check_mrtgtraf_config_wrapper tmp_config = process_arguments(argc, argv); |
58 | if (tmp_config.errorcode == ERROR) { | 58 | if (tmp_config.errorcode == ERROR) { |
59 | usage4(_("Could not parse arguments")); | 59 | usage4(_("Could not parse arguments")); |
60 | } | 60 | } |
61 | 61 | ||
62 | const check_mrtgraf_config config = tmp_config.config; | 62 | const check_mrtgtraf_config config = tmp_config.config; |
63 | 63 | ||
64 | /* open the MRTG log file for reading */ | 64 | /* open the MRTG log file for reading */ |
65 | FILE *mrtg_log_file_ptr = fopen(config.log_file, "r"); | 65 | FILE *mrtg_log_file_ptr = fopen(config.log_file, "r"); |
@@ -200,7 +200,7 @@ int main(int argc, char **argv) { | |||
200 | } | 200 | } |
201 | 201 | ||
202 | /* process command-line arguments */ | 202 | /* process command-line arguments */ |
203 | check_mrtgraf_config_wrapper process_arguments(int argc, char **argv) { | 203 | check_mrtgtraf_config_wrapper process_arguments(int argc, char **argv) { |
204 | static struct option longopts[] = {{"filename", required_argument, 0, 'F'}, | 204 | static struct option longopts[] = {{"filename", required_argument, 0, 'F'}, |
205 | {"expires", required_argument, 0, 'e'}, | 205 | {"expires", required_argument, 0, 'e'}, |
206 | {"aggregation", required_argument, 0, 'a'}, | 206 | {"aggregation", required_argument, 0, 'a'}, |
@@ -210,9 +210,9 @@ check_mrtgraf_config_wrapper process_arguments(int argc, char **argv) { | |||
210 | {"help", no_argument, 0, 'h'}, | 210 | {"help", no_argument, 0, 'h'}, |
211 | {0, 0, 0, 0}}; | 211 | {0, 0, 0, 0}}; |
212 | 212 | ||
213 | check_mrtgraf_config_wrapper result = { | 213 | check_mrtgtraf_config_wrapper result = { |
214 | .errorcode = OK, | 214 | .errorcode = OK, |
215 | .config = check_mrtgraf_config_init(), | 215 | .config = check_mrtgtraf_config_init(), |
216 | }; | 216 | }; |
217 | if (argc < 2) { | 217 | if (argc < 2) { |
218 | result.errorcode = ERROR; | 218 | result.errorcode = ERROR; |