summaryrefslogtreecommitdiffstats
path: root/plugins/check_disk.c
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/check_disk.c')
-rw-r--r--plugins/check_disk.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/plugins/check_disk.c b/plugins/check_disk.c
index b9787c8..3c7b0ec 100644
--- a/plugins/check_disk.c
+++ b/plugins/check_disk.c
@@ -153,6 +153,7 @@ main (int argc, char **argv)
153 char *output; 153 char *output;
154 char *details; 154 char *details;
155 char *perf; 155 char *perf;
156 char *preamble;
156 double inode_space_pct; 157 double inode_space_pct;
157 uintmax_t total, available, available_to_root, used; 158 uintmax_t total, available, available_to_root, used;
158 double dfree_pct = -1, dused_pct = -1; 159 double dfree_pct = -1, dused_pct = -1;
@@ -165,7 +166,8 @@ main (int argc, char **argv)
165 struct parameter_list *temp_list, *path; 166 struct parameter_list *temp_list, *path;
166 struct name_list *seen = NULL; 167 struct name_list *seen = NULL;
167 168
168 output = strdup (" - free space:"); 169 preamble = strdup (" - free space:");
170 output = strdup ("");
169 details = strdup (""); 171 details = strdup ("");
170 perf = strdup (""); 172 perf = strdup ("");
171 173
@@ -323,7 +325,7 @@ main (int argc, char **argv)
323 asprintf (&output, "%s%s", output, details); 325 asprintf (&output, "%s%s", output, details);
324 326
325 327
326 printf ("DISK %s%s|%s\n", state_text (result), output, perf); 328 printf ("DISK %s%s%s|%s\n", state_text (result), (erronly && result==STATE_OK) ? "" : preamble, output, perf);
327 return result; 329 return result;
328} 330}
329 331