diff options
Diffstat (limited to 'lib/utils_disk.h')
-rw-r--r-- | lib/utils_disk.h | 66 |
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 | ||
7 | struct name_list | 7 | struct name_list { |
8 | { | 8 | char *name; |
9 | char *name; | 9 | struct name_list *next; |
10 | struct name_list *next; | ||
11 | }; | 10 | }; |
12 | 11 | ||
13 | struct regex_list | 12 | struct 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 | ||
19 | struct parameter_list | 17 | struct 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 | ||
41 | void np_add_name (struct name_list **list, const char *name); | 37 | void np_add_name(struct name_list **list, const char *name); |
42 | bool np_find_name (struct name_list *list, const char *name); | 38 | bool np_find_name(struct name_list *list, const char *name); |
43 | bool np_seen_name (struct name_list *list, const char *name); | 39 | bool np_seen_name(struct name_list *list, const char *name); |
44 | int np_add_regex (struct regex_list **list, const char *regex, int cflags); | 40 | int np_add_regex(struct regex_list **list, const char *regex, int cflags); |
45 | bool np_find_regmatch (struct regex_list *list, const char *name); | 41 | bool np_find_regmatch(struct regex_list *list, const char *name); |
46 | struct parameter_list *np_add_parameter(struct parameter_list **list, const char *name); | 42 | struct parameter_list *np_add_parameter(struct parameter_list **list, const char *name); |
47 | struct parameter_list *np_find_parameter(struct parameter_list *list, const char *name); | 43 | struct parameter_list *np_find_parameter(struct parameter_list *list, const char *name); |
48 | struct parameter_list *np_del_parameter(struct parameter_list *item, struct parameter_list *prev); | 44 | struct parameter_list *np_del_parameter(struct parameter_list *item, struct parameter_list *prev); |
49 | 45 | ||
50 | int search_parameter_list (struct parameter_list *list, const char *name); | 46 | int search_parameter_list(struct parameter_list *list, const char *name); |
51 | void np_set_best_match(struct parameter_list *desired, struct mount_entry *mount_list, bool exact); | 47 | void np_set_best_match(struct parameter_list *desired, struct mount_entry *mount_list, bool exact); |
52 | bool np_regex_match_mount_entry (struct mount_entry* me, regex_t* re); | 48 | bool np_regex_match_mount_entry(struct mount_entry *me, regex_t *re); |