summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/output.c8
-rw-r--r--lib/output.h4
2 files changed, 6 insertions, 6 deletions
diff --git a/lib/output.c b/lib/output.c
index 07a77165..17919afc 100644
--- a/lib/output.c
+++ b/lib/output.c
@@ -235,7 +235,7 @@ char *mp_fmt_output(mp_check check) {
235 char *result = NULL; 235 char *result = NULL;
236 236
237 switch (check.format) { 237 switch (check.format) {
238 case MP_FORMAT_ICINGA_WEB_2: { 238 case MP_FORMAT_MULTI_LINE: {
239 if (check.summary == NULL) { 239 if (check.summary == NULL) {
240 check.summary = get_subcheck_summary(check); 240 check.summary = get_subcheck_summary(check);
241 } 241 }
@@ -245,7 +245,7 @@ char *mp_fmt_output(mp_check check) {
245 mp_subcheck_list *subchecks = check.subchecks; 245 mp_subcheck_list *subchecks = check.subchecks;
246 246
247 while (subchecks != NULL) { 247 while (subchecks != NULL) {
248 asprintf(&result, "%s\n%s", result, fmt_subcheck_output(MP_FORMAT_ICINGA_WEB_2, subchecks->subcheck, 1)); 248 asprintf(&result, "%s\n%s", result, fmt_subcheck_output(MP_FORMAT_MULTI_LINE, subchecks->subcheck, 1));
249 subchecks = subchecks->next; 249 subchecks = subchecks->next;
250 } 250 }
251 251
@@ -330,7 +330,7 @@ static inline char *fmt_subcheck_output(mp_output_format output_format, mp_subch
330 mp_subcheck_list *subchecks = NULL; 330 mp_subcheck_list *subchecks = NULL;
331 331
332 switch (output_format) { 332 switch (output_format) {
333 case MP_FORMAT_ICINGA_WEB_2: 333 case MP_FORMAT_MULTI_LINE:
334 asprintf(&result, "%s\\_[%s] - %s", generate_indentation_string(indentation), state_text(mp_compute_subcheck_state(check)), 334 asprintf(&result, "%s\\_[%s] - %s", generate_indentation_string(indentation), state_text(mp_compute_subcheck_state(check)),
335 check.output); 335 check.output);
336 336
@@ -510,7 +510,7 @@ mp_subcheck mp_set_subcheck_default_state(mp_subcheck check, mp_state_enum state
510} 510}
511 511
512char *mp_output_format_map[] = { 512char *mp_output_format_map[] = {
513 [MP_FORMAT_ICINGA_WEB_2] = "icingaweb2", 513 [MP_FORMAT_MULTI_LINE] = "multi-line",
514 [MP_FORMAT_TEST_JSON] = "mp-test-json", 514 [MP_FORMAT_TEST_JSON] = "mp-test-json",
515}; 515};
516 516
diff --git a/lib/output.h b/lib/output.h
index 14c4bcf4..ffc36f53 100644
--- a/lib/output.h
+++ b/lib/output.h
@@ -29,11 +29,11 @@ typedef struct subcheck_list {
29 * Possible output formats 29 * Possible output formats
30 */ 30 */
31typedef enum output_format { 31typedef enum output_format {
32 MP_FORMAT_ICINGA_WEB_2, 32 MP_FORMAT_MULTI_LINE,
33 MP_FORMAT_TEST_JSON, 33 MP_FORMAT_TEST_JSON,
34} mp_output_format; 34} mp_output_format;
35 35
36#define MP_FORMAT_DEFAULT MP_FORMAT_ICINGA_WEB_2 36#define MP_FORMAT_DEFAULT MP_FORMAT_MULTI_LINE
37 37
38/* 38/*
39 * The main state object of a plugin. Exists only ONCE per plugin. 39 * The main state object of a plugin. Exists only ONCE per plugin.