aboutsummaryrefslogtreecommitdiff
path: root/lib/utils_disk.h
blob: f99b905051cc493a7c2844c8e986c1b5bb52db36 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
/* Header file for utils_disk */

#include "mountlist.h"
#include "utils_base.h"
#include "regex.h"

struct name_list
{
  char *name;
  struct name_list *next;
};

struct parameter_list
{
  char *name;
  thresholds *freespace_bytes;
  thresholds *freespace_units;
  thresholds *freespace_percent;
  thresholds *usedspace_bytes;
  thresholds *usedspace_units;
  thresholds *usedspace_percent;
  thresholds *usedinodes_percent;
  thresholds *freeinodes_percent;
  char *group;
  struct mount_entry *best_match;
  struct parameter_list *name_next;
};

void np_add_name (struct name_list **list, const char *name);
int np_find_name (struct name_list *list, const char *name);
int np_seen_name (struct name_list *list, const char *name);
struct parameter_list *np_add_parameter(struct parameter_list **list, const char *name);
struct parameter_list *np_find_parameter(struct parameter_list *list, const char *name);
struct parameter_list *np_del_parameter(struct parameter_list *item, struct parameter_list *prev);
  
int search_parameter_list (struct parameter_list *list, const char *name);
void np_set_best_match(struct parameter_list *desired, struct mount_entry *mount_list, int exact);
int np_regex_match_mount_entry (struct mount_entry* me, regex_t* re);