summaryrefslogtreecommitdiffstats
path: root/plugins/check_disk.c
diff options
context:
space:
mode:
authorMatthias Eble <psychotrahe@users.sourceforge.net>2007-03-30 08:56:47 (GMT)
committerMatthias Eble <psychotrahe@users.sourceforge.net>2007-03-30 08:56:47 (GMT)
commitdf4c79ba35280b6bed248d673d510d2a0c39cc49 (patch)
tree99c66d04c75023b9d2ce51dd34c7a72ffdb7bcb6 /plugins/check_disk.c
parent0f71b7d07a8badd9aa38ef8d847bd982ab2db72c (diff)
downloadmonitoring-plugins-df4c79ba35280b6bed248d673d510d2a0c39cc49.tar.gz
check_disk: minor fix for -C if bestmatch != -p
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1659 f882894a-f735-0410-b71e-b25c423dba1c
Diffstat (limited to 'plugins/check_disk.c')
-rw-r--r--plugins/check_disk.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/plugins/check_disk.c b/plugins/check_disk.c
index 2b12e56..4872efc 100644
--- a/plugins/check_disk.c
+++ b/plugins/check_disk.c
@@ -439,8 +439,9 @@ int
439process_arguments (int argc, char **argv) 439process_arguments (int argc, char **argv)
440{ 440{
441 int c, err; 441 int c, err;
442 struct parameter_list *se; 442 struct parameter_list *se, *se2;
443 struct parameter_list *temp_list; 443 struct parameter_list *temp_list;
444 struct parameter_list *temp_path_select_list = NULL;
444 struct mount_entry *me; 445 struct mount_entry *me;
445 int result = OK; 446 int result = OK;
446 struct stat *stat_buf; 447 struct stat *stat_buf;
@@ -605,6 +606,12 @@ process_arguments (int argc, char **argv)
605 die (STATE_UNKNOWN, "DISK %s: %s", _("UNKNOWN"), _("Must set a threshold value before using -p\n")); 606 die (STATE_UNKNOWN, "DISK %s: %s", _("UNKNOWN"), _("Must set a threshold value before using -p\n"));
606 } 607 }
607 608
609 /* get the real mountdir of the specified path. np_find_parameter won't find an entry if -p is not
610 * exactly the same string as the mountdir */
611 se2 = np_add_parameter(&temp_path_select_list, optarg);
612 np_set_best_match(se2, mount_list, FALSE);
613
614
608 /* add parameter if not found. overwrite thresholds if path has already been added */ 615 /* add parameter if not found. overwrite thresholds if path has already been added */
609 if (! (se = np_find_parameter(path_select_list, optarg))) { 616 if (! (se = np_find_parameter(path_select_list, optarg))) {
610 se = np_add_parameter(&path_select_list, optarg); 617 se = np_add_parameter(&path_select_list, optarg);