diff options
-rw-r--r-- | NEWS | 1 | ||||
-rw-r--r-- | THANKS.in | 1 | ||||
-rw-r--r-- | lib/utils_disk.c | 19 | ||||
-rw-r--r-- | plugins/check_disk.c | 10 |
4 files changed, 16 insertions, 15 deletions
@@ -15,6 +15,7 @@ This file documents the major additions and syntax changes between releases. | |||
15 | Add missing long options for check_nt (for use with extra-opts) | 15 | Add missing long options for check_nt (for use with extra-opts) |
16 | check_icmp now reports min and max round trip time perfdata (Steve Rader) | 16 | check_icmp now reports min and max round trip time perfdata (Steve Rader) |
17 | Fixed bug where additional headers with redirection caused a segfault (Dieter Van de Walle - 2089159) | 17 | Fixed bug where additional headers with redirection caused a segfault (Dieter Van de Walle - 2089159) |
18 | check_disk: make autofs mount paths specified with -p before we determing the mount list (Erik Welch) | ||
18 | 19 | ||
19 | 1.4.13 25th Sept 2008 | 20 | 1.4.13 25th Sept 2008 |
20 | Fix Debian bug #460097: check_http --max-age broken (Hilko Bengen) | 21 | Fix Debian bug #460097: check_http --max-age broken (Hilko Bengen) |
@@ -243,3 +243,4 @@ Olivier 'Babar' Raginel | |||
243 | Steve Rader | 243 | Steve Rader |
244 | Dieter Van de Walle | 244 | Dieter Van de Walle |
245 | Jan Lipphaus | 245 | Jan Lipphaus |
246 | Erik Welch | ||
diff --git a/lib/utils_disk.c b/lib/utils_disk.c index e22d6680..3ce4d47d 100644 --- a/lib/utils_disk.c +++ b/lib/utils_disk.c | |||
@@ -77,19 +77,18 @@ np_add_parameter(struct parameter_list **list, const char *name) | |||
77 | struct parameter_list * | 77 | struct parameter_list * |
78 | np_del_parameter(struct parameter_list *item, struct parameter_list *prev) | 78 | np_del_parameter(struct parameter_list *item, struct parameter_list *prev) |
79 | { | 79 | { |
80 | struct parameter_list *next; | 80 | struct parameter_list *next; |
81 | if (item->name_next) | ||
82 | next = item->name_next; | ||
83 | else | ||
84 | next = NULL; | ||
85 | 81 | ||
86 | 82 | if (item->name_next) | |
87 | free(item); | 83 | next = item->name_next; |
88 | if (prev) | 84 | else |
89 | prev->name_next = next; | 85 | next = NULL; |
90 | 86 | ||
91 | return next; | 87 | free(item); |
88 | if (prev) | ||
89 | prev->name_next = next; | ||
92 | 90 | ||
91 | return next; | ||
93 | } | 92 | } |
94 | 93 | ||
95 | 94 | ||
diff --git a/plugins/check_disk.c b/plugins/check_disk.c index 2f8afa6c..f0950c95 100644 --- a/plugins/check_disk.c +++ b/plugins/check_disk.c | |||
@@ -118,9 +118,6 @@ enum | |||
118 | #pragma alloca | 118 | #pragma alloca |
119 | #endif | 119 | #endif |
120 | 120 | ||
121 | /* Linked list of mounted filesystems. */ | ||
122 | static struct mount_entry *mount_list; | ||
123 | |||
124 | int process_arguments (int, char **); | 121 | int process_arguments (int, char **); |
125 | void print_path (const char *mypath); | 122 | void print_path (const char *mypath); |
126 | void set_all_thresholds (struct parameter_list *path); | 123 | void set_all_thresholds (struct parameter_list *path); |
@@ -639,8 +636,12 @@ process_arguments (int argc, char **argv) | |||
639 | } | 636 | } |
640 | se->group = group; | 637 | se->group = group; |
641 | set_all_thresholds(se); | 638 | set_all_thresholds(se); |
642 | np_set_best_match(se, mount_list, exact_match); | 639 | |
640 | /* With autofs, it is required to stat() the path before populating the mount_list */ | ||
643 | stat_path(se); | 641 | stat_path(se); |
642 | mount_list = read_file_system_list (0); | ||
643 | np_set_best_match(se, mount_list, exact_match); | ||
644 | |||
644 | path_selected = TRUE; | 645 | path_selected = TRUE; |
645 | break; | 646 | break; |
646 | case 'x': /* exclude path or partition */ | 647 | case 'x': /* exclude path or partition */ |
@@ -757,7 +758,6 @@ process_arguments (int argc, char **argv) | |||
757 | case 'C': | 758 | case 'C': |
758 | /* add all mount entries to path_select list if no partitions have been explicitly defined using -p */ | 759 | /* add all mount entries to path_select list if no partitions have been explicitly defined using -p */ |
759 | if (path_selected == FALSE) { | 760 | if (path_selected == FALSE) { |
760 | struct mount_entry *me; | ||
761 | struct parameter_list *path; | 761 | struct parameter_list *path; |
762 | for (me = mount_list; me; me = me->me_next) { | 762 | for (me = mount_list; me; me = me->me_next) { |
763 | if (! (path = np_find_parameter(path_select_list, me->me_mountdir))) | 763 | if (! (path = np_find_parameter(path_select_list, me->me_mountdir))) |