[Nagiosplug-checkins] nagiosplug/plugins check_disk.c,1.76,1.77
Ton Voon
tonvoon at users.sourceforge.net
Thu Oct 12 16:14:50 CEST 2006
Update of /cvsroot/nagiosplug/nagiosplug/plugins
In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv5944
Modified Files:
check_disk.c
Log Message:
Remove the "- free space" if status is OK
Index: check_disk.c
===================================================================
RCS file: /cvsroot/nagiosplug/nagiosplug/plugins/check_disk.c,v
retrieving revision 1.76
retrieving revision 1.77
diff -u -d -r1.76 -r1.77
--- check_disk.c 12 Oct 2006 13:58:43 -0000 1.76
+++ check_disk.c 12 Oct 2006 14:14:47 -0000 1.77
@@ -153,6 +153,7 @@
char *output;
char *details;
char *perf;
+ char *preamble;
double inode_space_pct;
uintmax_t total, available, available_to_root, used;
double dfree_pct = -1, dused_pct = -1;
@@ -165,7 +166,8 @@
struct parameter_list *temp_list, *path;
struct name_list *seen = NULL;
- output = strdup (" - free space:");
+ preamble = strdup (" - free space:");
+ output = strdup ("");
details = strdup ("");
perf = strdup ("");
@@ -323,7 +325,7 @@
asprintf (&output, "%s%s", output, details);
- printf ("DISK %s%s|%s\n", state_text (result), output, perf);
+ printf ("DISK %s%s%s|%s\n", state_text (result), (erronly && result==STATE_OK) ? "" : preamble, output, perf);
return result;
}
More information about the Commits
mailing list