[Nagiosplug-checkins] nagiosplug/plugins check_disk.c,1.89,1.90

Matthias Eble psychotrahe at users.sourceforge.net
Fri Mar 30 10:56:49 CEST 2007


Update of /cvsroot/nagiosplug/nagiosplug/plugins
In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv1461/plugins

Modified Files:
	check_disk.c 
Log Message:
check_disk: minor fix for -C if bestmatch != -p 


Index: check_disk.c
===================================================================
RCS file: /cvsroot/nagiosplug/nagiosplug/plugins/check_disk.c,v
retrieving revision 1.89
retrieving revision 1.90
diff -u -d -r1.89 -r1.90
--- check_disk.c	30 Mar 2007 08:53:58 -0000	1.89
+++ check_disk.c	30 Mar 2007 08:56:47 -0000	1.90
@@ -439,8 +439,9 @@
 process_arguments (int argc, char **argv)
 {
   int c, err;
-  struct parameter_list *se;
+  struct parameter_list *se, *se2;
   struct parameter_list *temp_list;
+  struct parameter_list *temp_path_select_list = NULL;
   struct mount_entry *me;
   int result = OK;
   struct stat *stat_buf;
@@ -605,6 +606,12 @@
         die (STATE_UNKNOWN, "DISK %s: %s", _("UNKNOWN"), _("Must set a threshold value before using -p\n"));
       }
 
+      /* get the real mountdir of the specified path. np_find_parameter won't find an entry if -p is not
+       * exactly the same string as the mountdir */
+      se2 = np_add_parameter(&temp_path_select_list, optarg);
+      np_set_best_match(se2, mount_list, FALSE);
+
+
       /* add parameter if not found. overwrite thresholds if path has already been added  */
       if (! (se = np_find_parameter(path_select_list, optarg))) {
           se = np_add_parameter(&path_select_list, optarg);





More information about the Commits mailing list