diff options
Diffstat (limited to 'plugins/check_disk.c')
-rw-r--r-- | plugins/check_disk.c | 83 |
1 files changed, 34 insertions, 49 deletions
diff --git a/plugins/check_disk.c b/plugins/check_disk.c index 24de2d45..b3dd301c 100644 --- a/plugins/check_disk.c +++ b/plugins/check_disk.c | |||
@@ -119,44 +119,41 @@ enum | |||
119 | #pragma alloca | 119 | #pragma alloca |
120 | #endif | 120 | #endif |
121 | 121 | ||
122 | int process_arguments (int, char **); | 122 | static int process_arguments (int, char **); |
123 | void print_path (const char *mypath); | 123 | static void set_all_thresholds (struct parameter_list *path); |
124 | void set_all_thresholds (struct parameter_list *path); | 124 | static void print_help (void); |
125 | int validate_arguments (uintmax_t, uintmax_t, double, double, double, double, char *); | ||
126 | void print_help (void); | ||
127 | void print_usage (void); | 125 | void print_usage (void); |
128 | double calculate_percent(uintmax_t, uintmax_t); | 126 | static double calculate_percent(uintmax_t, uintmax_t); |
129 | bool stat_path (struct parameter_list *p); | 127 | static bool stat_path (struct parameter_list *p); |
130 | void get_stats (struct parameter_list *p, struct fs_usage *fsp); | 128 | static void get_stats (struct parameter_list *p, struct fs_usage *fsp); |
131 | void get_path_stats (struct parameter_list *p, struct fs_usage *fsp); | 129 | static void get_path_stats (struct parameter_list *p, struct fs_usage *fsp); |
132 | 130 | ||
133 | char *exclude_device; | 131 | static char *units; |
134 | char *units; | 132 | static uintmax_t mult = 1024 * 1024; |
135 | uintmax_t mult = 1024 * 1024; | 133 | static int verbose = 0; |
136 | int verbose = 0; | 134 | static bool erronly = false; |
137 | bool erronly = false; | 135 | static bool display_mntp = false; |
138 | bool display_mntp = false; | 136 | static bool exact_match = false; |
139 | bool exact_match = false; | 137 | static bool ignore_missing = false; |
140 | bool ignore_missing = false; | 138 | static bool freespace_ignore_reserved = false; |
141 | bool freespace_ignore_reserved = false; | 139 | static bool display_inodes_perfdata = false; |
142 | bool display_inodes_perfdata = false; | 140 | static char *warn_freespace_units = NULL; |
143 | char *warn_freespace_units = NULL; | 141 | static char *crit_freespace_units = NULL; |
144 | char *crit_freespace_units = NULL; | 142 | static char *warn_freespace_percent = NULL; |
145 | char *warn_freespace_percent = NULL; | 143 | static char *crit_freespace_percent = NULL; |
146 | char *crit_freespace_percent = NULL; | 144 | static char *warn_usedspace_units = NULL; |
147 | char *warn_usedspace_units = NULL; | 145 | static char *crit_usedspace_units = NULL; |
148 | char *crit_usedspace_units = NULL; | 146 | static char *warn_usedspace_percent = NULL; |
149 | char *warn_usedspace_percent = NULL; | 147 | static char *crit_usedspace_percent = NULL; |
150 | char *crit_usedspace_percent = NULL; | 148 | static char *warn_usedinodes_percent = NULL; |
151 | char *warn_usedinodes_percent = NULL; | 149 | static char *crit_usedinodes_percent = NULL; |
152 | char *crit_usedinodes_percent = NULL; | 150 | static char *warn_freeinodes_percent = NULL; |
153 | char *warn_freeinodes_percent = NULL; | 151 | static char *crit_freeinodes_percent = NULL; |
154 | char *crit_freeinodes_percent = NULL; | 152 | static bool path_selected = false; |
155 | bool path_selected = false; | 153 | static bool path_ignored = false; |
156 | bool path_ignored = false; | 154 | static char *group = NULL; |
157 | char *group = NULL; | 155 | static struct stat *stat_buf; |
158 | struct stat *stat_buf; | 156 | static struct name_list *seen = NULL; |
159 | struct name_list *seen = NULL; | ||
160 | 157 | ||
161 | 158 | ||
162 | int | 159 | int |
@@ -899,18 +896,6 @@ process_arguments (int argc, char **argv) | |||
899 | return true; | 896 | return true; |
900 | } | 897 | } |
901 | 898 | ||
902 | |||
903 | |||
904 | void | ||
905 | print_path (const char *mypath) | ||
906 | { | ||
907 | if (mypath == NULL) | ||
908 | printf ("\n"); | ||
909 | else | ||
910 | printf (_(" for %s\n"), mypath); | ||
911 | } | ||
912 | |||
913 | |||
914 | void | 899 | void |
915 | set_all_thresholds (struct parameter_list *path) | 900 | set_all_thresholds (struct parameter_list *path) |
916 | { | 901 | { |