summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: d23b17e)
raw | patch | inline | side by side (parent: d23b17e)
author | Matthias Eble <psychotrahe@users.sourceforge.net> | |
Sat, 22 Sep 2007 17:48:33 +0000 (17:48 +0000) | ||
committer | Matthias Eble <psychotrahe@users.sourceforge.net> | |
Sat, 22 Sep 2007 17:48:33 +0000 (17:48 +0000) |
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1787 f882894a-f735-0410-b71e-b25c423dba1c
lib/utils_disk.c | patch | blob | history | |
lib/utils_tcp.c | patch | blob | history | |
plugins/check_disk.c | patch | blob | history |
diff --git a/lib/utils_disk.c b/lib/utils_disk.c
index 3f9c8a9a830ef16ca0cd98454add0c8b1da31bde..9324f5f32d35fd707ccb71158ee3c55543912ae1 100644 (file)
--- a/lib/utils_disk.c
+++ b/lib/utils_disk.c
{
if (regexec(re, me->me_devname, (size_t) 0, NULL, 0) == 0 ||
regexec(re, me->me_mountdir, (size_t) 0, NULL, 0) == 0 ) {
- return true;
+ return TRUE;
} else {
- return false;
+ return FALSE;
}
}
diff --git a/lib/utils_tcp.c b/lib/utils_tcp.c
index b7075197a9c79306d8198e72a1739fbdfea12225..2fefaf3c1a7bd86c7616bea866d4b364d3914122 100644 (file)
--- a/lib/utils_tcp.c
+++ b/lib/utils_tcp.c
} else
if(verbose) puts("couldn't find it");
}
- if ((all == true && match == expect_count) ||
+ if ((all == TRUE && match == expect_count) ||
(! all && match >= 1)) {
- return true;
+ return TRUE;
} else
- return false;
+ return FALSE;
}
diff --git a/plugins/check_disk.c b/plugins/check_disk.c
index d2674097c46c60d58017d890aef9647fcc33fc84..088c589e4cc6e655c06e08428a0aa4d1be558e85 100644 (file)
--- a/plugins/check_disk.c
+++ b/plugins/check_disk.c
char *crit_usedinodes_percent = NULL;
char *warn_freeinodes_percent = NULL;
char *crit_freeinodes_percent = NULL;
-bool path_selected = false;
+int path_selected = FALSE;
char *group = NULL;
/* If a list of paths has not been selected, find entire
mount list and create list of paths
*/
- if (path_selected == false) {
+ if (path_selected == FALSE) {
for (me = mount_list; me; me = me->me_next) {
if (! (path = np_find_parameter(path_select_list, me->me_mountdir))) {
path = np_add_parameter(&path_select_list, me->me_mountdir);
se->group = group;
set_all_thresholds(se);
np_set_best_match(se, mount_list, exact_match);
- path_selected = true;
+ path_selected = TRUE;
break;
case 'x': /* exclude path or partition */
np_add_name(&dp_exclude_list, optarg);
for (me = mount_list; me; me = me->me_next) {
if (np_regex_match_mount_entry(me, &re)) {
- fnd = true;
+ fnd = TRUE;
if (verbose > 3)
printf("%s %s matching expression %s\n", me->me_devname, me->me_mountdir, optarg);
die (STATE_UNKNOWN, "DISK %s: %s - %s\n",_("UNKNOWN"),
_("Regular expression did not match any path or disk"), optarg);
- fnd = false;
- path_selected = true;
+ fnd = FALSE;
+ path_selected = TRUE;
np_set_best_match(path_select_list, mount_list, exact_match);
cflags = default_cflags;
break;
case 'C':
/* add all mount entries to path_select list if no partitions have been explicitly defined using -p */
- if (path_selected == false) {
+ if (path_selected == FALSE) {
struct mount_entry *me;
struct parameter_list *path;
for (me = mount_list; me; me = me->me_next) {
warn_freeinodes_percent = NULL;
crit_freeinodes_percent = NULL;
- path_selected = false;
+ path_selected = FALSE;
group = NULL;
break;
case 'V': /* version */
if (argc > c && path == NULL) {
se = np_add_parameter(&path_select_list, strdup(argv[c++]));
- path_selected = true;
+ path_selected = TRUE;
set_all_thresholds(se);
}