[Nagiosplug-checkins] CVS: nagiosplug/plugins check_disk.c,1.17,1.18

Karl DeBisschop kdebisschop at users.sourceforge.net
Sat Mar 22 22:21:25 CET 2003


Update of /cvsroot/nagiosplug/nagiosplug/plugins
In directory sc8-pr-cvs1:/tmp/cvs-serv4704/plugins

Modified Files:
	check_disk.c 
Log Message:
can once again exclude indiviual path/partitions

Index: check_disk.c
===================================================================
RCS file: /cvsroot/nagiosplug/nagiosplug/plugins/check_disk.c,v
retrieving revision 1.17
retrieving revision 1.18
diff -C2 -r1.17 -r1.18
*** check_disk.c	23 Mar 2003 06:11:26 -0000	1.17
--- check_disk.c	23 Mar 2003 06:20:50 -0000	1.18
***************
*** 116,119 ****
--- 116,121 ----
  static struct name_list *fs_exclude_list;
  
+ static struct name_list *dp_exclude_list;
+ 
  static struct name_list *path_select_list;
  
***************
*** 192,195 ****
--- 194,201 ----
  		else if (fs_exclude_list && walk_name_list (fs_exclude_list, me->me_type))
  			continue;
+ 		else if (dp_exclude_list && 
+ 		         walk_name_list (dp_exclude_list, me->me_devname) ||
+ 		         walk_name_list (dp_exclude_list, me->me_mountdir))
+ 			continue;
  		else
  			get_fs_usage (me->me_mountdir, me->me_devname, &fsp);
***************
*** 238,241 ****
--- 244,248 ----
    struct name_list **devtail = &dev_select_list;
    struct name_list **fstail = &fs_exclude_list;
+   struct name_list **dptail = &dp_exclude_list;
  
  	int option_index = 0;
***************
*** 312,316 ****
  				usage ("Timeout Interval must be an integer!\n");
  			}
! 		case 'p':									/* path or partition */
  			se = (struct name_list *) malloc (sizeof (struct name_list));
  			se->name = strdup (optarg);
--- 319,323 ----
  				usage ("Timeout Interval must be an integer!\n");
  			}
! 		case 'p':									/* selec path */
  			se = (struct name_list *) malloc (sizeof (struct name_list));
  			se->name = strdup (optarg);
***************
*** 319,323 ****
  			pathtail = &se->name_next;
  			break;
! 		case 'd':									/* path or partition */
  			se = (struct name_list *) malloc (sizeof (struct name_list));
  			se->name = strdup (optarg);
--- 326,330 ----
  			pathtail = &se->name_next;
  			break;
! 		case 'd':									/* select partition/device */
  			se = (struct name_list *) malloc (sizeof (struct name_list));
  			se->name = strdup (optarg);
***************
*** 326,330 ****
  			devtail = &se->name_next;
  			break;
! 		case 'X':									/* path or partition */
  			se = (struct name_list *) malloc (sizeof (struct name_list));
  			se->name = strdup (optarg);
--- 333,345 ----
  			devtail = &se->name_next;
  			break;
!  		case 'x':									/* exclude path or partition */
! 			se = (struct name_list *) malloc (sizeof (struct name_list));
! 			se->name = strdup (optarg);
! 			se->name_next = NULL;
! 			*dptail = se;
! 			dptail = &se->name_next;
! 			break;
!  			break;
! 		case 'X':									/* exclude file system type */
  			se = (struct name_list *) malloc (sizeof (struct name_list));
  			se->name = strdup (optarg);
***************
*** 345,351 ****
  			display_mntp = TRUE;
  			break;
-  		case 'x':									/* exclude path or partition */
-  			exclude_device = optarg;
-  			break;
  		case 'V':									/* version */
  			print_revision (progname, revision);
--- 360,363 ----





More information about the Commits mailing list