diff options
Diffstat (limited to 'plugins/check_disk.c')
-rw-r--r-- | plugins/check_disk.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/plugins/check_disk.c b/plugins/check_disk.c index e7e9378f..06576d86 100644 --- a/plugins/check_disk.c +++ b/plugins/check_disk.c | |||
@@ -97,7 +97,7 @@ static struct regex_list *fs_exclude_list = NULL; | |||
97 | 97 | ||
98 | /* Linked list of filesystem types to check. | 98 | /* Linked list of filesystem types to check. |
99 | If the list is empty, include all types. */ | 99 | If the list is empty, include all types. */ |
100 | static struct name_list *fs_include_list; | 100 | static struct regex_list *fs_include_list; |
101 | 101 | ||
102 | static struct name_list *dp_exclude_list; | 102 | static struct name_list *dp_exclude_list; |
103 | 103 | ||
@@ -308,7 +308,7 @@ main (int argc, char **argv) | |||
308 | np_find_name (dp_exclude_list, me->me_mountdir))) { | 308 | np_find_name (dp_exclude_list, me->me_mountdir))) { |
309 | continue; | 309 | continue; |
310 | /* Skip not included fstypes */ | 310 | /* Skip not included fstypes */ |
311 | } else if (fs_include_list && !np_find_name (fs_include_list, me->me_type)) { | 311 | } else if (fs_include_list && !np_find_regmatch(fs_include_list, me->me_type)) { |
312 | continue; | 312 | continue; |
313 | } | 313 | } |
314 | } | 314 | } |
@@ -723,7 +723,11 @@ process_arguments (int argc, char **argv) | |||
723 | } | 723 | } |
724 | break; | 724 | break; |
725 | case 'N': /* include file system type */ | 725 | case 'N': /* include file system type */ |
726 | np_add_name(&fs_include_list, optarg); | 726 | err = np_add_regex(&fs_include_list, optarg, REG_EXTENDED); |
727 | if (err != 0) { | ||
728 | regerror (err, &fs_exclude_list->regex, errbuf, MAX_INPUT_BUFFER); | ||
729 | die (STATE_UNKNOWN, "DISK %s: %s - %s\n",_("UNKNOWN"), _("Could not compile regular expression"), errbuf); | ||
730 | } | ||
727 | break; | 731 | break; |
728 | case 'v': /* verbose */ | 732 | case 'v': /* verbose */ |
729 | verbose++; | 733 | verbose++; |