From d23b17e6567d8eb983956b36b31a383f3cc639d2 Mon Sep 17 00:00:00 2001 From: Matthias Eble Date: Sat, 22 Sep 2007 17:40:35 +0000 Subject: Added -i/-I to ignore pathes/partitions based on regular expressions Added check_disk -A selecting all filesystems -E option must now be passed before -p or -r/-R Passing -E after -p or -r results in UNKNOWN state Fixed bug when mixing case sensitive and insensitive regexes git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1786 f882894a-f735-0410-b71e-b25c423dba1c --- lib/utils_disk.c | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) (limited to 'lib/utils_disk.c') diff --git a/lib/utils_disk.c b/lib/utils_disk.c index 96f5a306..3f9c8a9a 100644 --- a/lib/utils_disk.c +++ b/lib/utils_disk.c @@ -74,6 +74,26 @@ np_add_parameter(struct parameter_list **list, const char *name) return new_path; } +/* Delete a given parameter from list and return pointer to next element*/ +struct parameter_list * +np_del_parameter(struct parameter_list *item, struct parameter_list *prev) +{ + struct parameter_list *next; + if (item->name_next) + next = item->name_next; + else + next = NULL; + + + free(item); + if (prev) + prev->name_next = next; + + return next; + +} + + /* returns a pointer to the struct found in the list */ struct parameter_list * np_find_parameter(struct parameter_list *list, const char *name) @@ -166,3 +186,4 @@ np_regex_match_mount_entry (struct mount_entry* me, regex_t* re) return false; } } + -- cgit v1.2.3