summaryrefslogtreecommitdiffstats
path: root/lib/utils_disk.h
diff options
context:
space:
mode:
Diffstat (limited to 'lib/utils_disk.h')
-rw-r--r--lib/utils_disk.h66
1 files changed, 31 insertions, 35 deletions
diff --git a/lib/utils_disk.h b/lib/utils_disk.h
index 5b2caf2..c5e81dc 100644
--- a/lib/utils_disk.h
+++ b/lib/utils_disk.h
@@ -4,49 +4,45 @@
4#include "utils_base.h" 4#include "utils_base.h"
5#include "regex.h" 5#include "regex.h"
6 6
7struct name_list 7struct name_list {
8{ 8 char *name;
9 char *name; 9 struct name_list *next;
10 struct name_list *next;
11}; 10};
12 11
13struct regex_list 12struct regex_list {
14{ 13 regex_t regex;
15 regex_t regex; 14 struct regex_list *next;
16 struct regex_list *next;
17}; 15};
18 16
19struct parameter_list 17struct parameter_list {
20{ 18 char *name;
21 char *name; 19 thresholds *freespace_bytes;
22 thresholds *freespace_bytes; 20 thresholds *freespace_units;
23 thresholds *freespace_units; 21 thresholds *freespace_percent;
24 thresholds *freespace_percent; 22 thresholds *usedspace_bytes;
25 thresholds *usedspace_bytes; 23 thresholds *usedspace_units;
26 thresholds *usedspace_units; 24 thresholds *usedspace_percent;
27 thresholds *usedspace_percent; 25 thresholds *usedinodes_percent;
28 thresholds *usedinodes_percent; 26 thresholds *freeinodes_percent;
29 thresholds *freeinodes_percent; 27 char *group;
30 char *group; 28 struct mount_entry *best_match;
31 struct mount_entry *best_match; 29 struct parameter_list *name_next;
32 struct parameter_list *name_next; 30 struct parameter_list *name_prev;
33 struct parameter_list *name_prev; 31 uintmax_t total, available, available_to_root, used, inodes_free, inodes_free_to_root, inodes_used, inodes_total;
34 uintmax_t total, available, available_to_root, used, 32 double dfree_pct, dused_pct;
35 inodes_free, inodes_free_to_root, inodes_used, inodes_total; 33 uint64_t dused_units, dfree_units, dtotal_units;
36 double dfree_pct, dused_pct; 34 double dused_inodes_percent, dfree_inodes_percent;
37 uint64_t dused_units, dfree_units, dtotal_units;
38 double dused_inodes_percent, dfree_inodes_percent;
39}; 35};
40 36
41void np_add_name (struct name_list **list, const char *name); 37void np_add_name(struct name_list **list, const char *name);
42bool np_find_name (struct name_list *list, const char *name); 38bool np_find_name(struct name_list *list, const char *name);
43bool np_seen_name (struct name_list *list, const char *name); 39bool np_seen_name(struct name_list *list, const char *name);
44int np_add_regex (struct regex_list **list, const char *regex, int cflags); 40int np_add_regex(struct regex_list **list, const char *regex, int cflags);
45bool np_find_regmatch (struct regex_list *list, const char *name); 41bool np_find_regmatch(struct regex_list *list, const char *name);
46struct parameter_list *np_add_parameter(struct parameter_list **list, const char *name); 42struct parameter_list *np_add_parameter(struct parameter_list **list, const char *name);
47struct parameter_list *np_find_parameter(struct parameter_list *list, const char *name); 43struct parameter_list *np_find_parameter(struct parameter_list *list, const char *name);
48struct parameter_list *np_del_parameter(struct parameter_list *item, struct parameter_list *prev); 44struct parameter_list *np_del_parameter(struct parameter_list *item, struct parameter_list *prev);
49 45
50int search_parameter_list (struct parameter_list *list, const char *name); 46int search_parameter_list(struct parameter_list *list, const char *name);
51void np_set_best_match(struct parameter_list *desired, struct mount_entry *mount_list, bool exact); 47void np_set_best_match(struct parameter_list *desired, struct mount_entry *mount_list, bool exact);
52bool np_regex_match_mount_entry (struct mount_entry* me, regex_t* re); 48bool np_regex_match_mount_entry(struct mount_entry *me, regex_t *re);