summaryrefslogtreecommitdiffstats
path: root/plugins/check_apt.d/config.h
diff options
context:
space:
mode:
authorLorenz Kästle <12514511+RincewindsHat@users.noreply.github.com>2025-09-16 14:31:19 +0200
committerGitHub <noreply@github.com>2025-09-16 14:31:19 +0200
commit1f20998d0c2c80fc2b407debfdd60d6039c87b8c (patch)
tree117f119af9353bdf77a03e5f466ce36b585237a6 /plugins/check_apt.d/config.h
parentc1f0f113c95787e0cb553f2d0ed0a702164eaa97 (diff)
parentdab009654cfb76d690d7fb64ca9a190d855a308f (diff)
downloadmonitoring-plugins-1f20998d0c2c80fc2b407debfdd60d6039c87b8c.tar.gz
Merge pull request #2148 from RincewindsHat/refactor/check_apt
Refactor/check apt: implement new output functionality
Diffstat (limited to 'plugins/check_apt.d/config.h')
-rw-r--r--plugins/check_apt.d/config.h9
1 files changed, 7 insertions, 2 deletions
diff --git a/plugins/check_apt.d/config.h b/plugins/check_apt.d/config.h
index 981f4f42..e4d622f1 100644
--- a/plugins/check_apt.d/config.h
+++ b/plugins/check_apt.d/config.h
@@ -2,6 +2,7 @@
2 2
3#include "../../config.h" 3#include "../../config.h"
4#include <stddef.h> 4#include <stddef.h>
5#include "../lib/output.h"
5 6
6/* some constants */ 7/* some constants */
7typedef enum { 8typedef enum {
@@ -16,7 +17,7 @@ typedef struct {
16 bool only_critical; /* whether to warn about non-critical updates */ 17 bool only_critical; /* whether to warn about non-critical updates */
17 bool list; /* list packages available for upgrade */ 18 bool list; /* list packages available for upgrade */
18 /* number of packages available for upgrade to return WARNING status */ 19 /* number of packages available for upgrade to return WARNING status */
19 int packages_warning; 20 size_t packages_warning;
20 21
21 char *upgrade_opts; /* options to override defaults for upgrade */ 22 char *upgrade_opts; /* options to override defaults for upgrade */
22 char *update_opts; /* options to override defaults for update */ 23 char *update_opts; /* options to override defaults for update */
@@ -24,6 +25,9 @@ typedef struct {
24 char *do_exclude; /* regexp to only exclude certain packages */ 25 char *do_exclude; /* regexp to only exclude certain packages */
25 char *do_critical; /* regexp specifying critical packages */ 26 char *do_critical; /* regexp specifying critical packages */
26 char *input_filename; /* input filename for testing */ 27 char *input_filename; /* input filename for testing */
28
29 bool output_format_is_set;
30 mp_output_format output_format;
27} check_apt_config; 31} check_apt_config;
28 32
29check_apt_config check_apt_config_init() { 33check_apt_config check_apt_config_init() {
@@ -36,6 +40,7 @@ check_apt_config check_apt_config_init() {
36 .do_include = NULL, 40 .do_include = NULL,
37 .do_exclude = NULL, 41 .do_exclude = NULL,
38 .do_critical = NULL, 42 .do_critical = NULL,
39 .input_filename = NULL}; 43 .input_filename = NULL,
44 .output_format_is_set = false};
40 return tmp; 45 return tmp;
41} 46}