summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: e7b6c3b)
raw | patch | inline | side by side (parent: e7b6c3b)
author | Karl DeBisschop <kdebisschop@users.sourceforge.net> | |
Sun, 23 Mar 2003 06:20:50 +0000 (06:20 +0000) | ||
committer | Karl DeBisschop <kdebisschop@users.sourceforge.net> | |
Sun, 23 Mar 2003 06:20:50 +0000 (06:20 +0000) |
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@448 f882894a-f735-0410-b71e-b25c423dba1c
plugins/check_disk.c | patch | blob | history |
diff --git a/plugins/check_disk.c b/plugins/check_disk.c
index 3e9fa46ec47954de60ff0f35957b03d417afa92e..a7dd5cce02e331e27c82c61f5c1e29f1dabdcb0e 100644 (file)
--- a/plugins/check_disk.c
+++ b/plugins/check_disk.c
static struct name_list *fs_exclude_list;
+static struct name_list *dp_exclude_list;
+
static struct name_list *path_select_list;
static struct name_list *dev_select_list;
continue;
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);
struct name_list **pathtail = &path_select_list;
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;
static struct option long_options[] = {
else {
usage ("Timeout Interval must be an integer!\n");
}
- case 'p': /* path or partition */
+ case 'p': /* selec path */
se = (struct name_list *) malloc (sizeof (struct name_list));
se->name = strdup (optarg);
se->name_next = NULL;
*pathtail = se;
pathtail = &se->name_next;
break;
- case 'd': /* path or partition */
+ case 'd': /* select partition/device */
se = (struct name_list *) malloc (sizeof (struct name_list));
se->name = strdup (optarg);
se->name_next = NULL;
*devtail = se;
devtail = &se->name_next;
break;
- case 'X': /* path or partition */
+ 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);
se->name_next = NULL;
case 'm': /* display mountpoint */
display_mntp = TRUE;
break;
- case 'x': /* exclude path or partition */
- exclude_device = optarg;
- break;
case 'V': /* version */
print_revision (progname, revision);
exit (STATE_OK);