]> arthur.barton.de Git - netdata.git/blob - src/proc_self_mountinfo.h
registry folder will be forced
[netdata.git] / src / proc_self_mountinfo.h
1 #ifndef NETDATA_PROC_SELF_MOUNTINFO_H
2 #define NETDATA_PROC_SELF_MOUNTINFO_H 1
3
4 struct mountinfo {
5     long id;                // mount ID: unique identifier of the mount (may be reused after umount(2)).
6     long parentid;          // parent ID: ID of parent mount (or of self for the top of the mount tree).
7     unsigned long major;    // major:minor: value of st_dev for files on filesystem (see stat(2)).
8     unsigned long minor;
9
10     char *root;             // root: root of the mount within the filesystem.
11     uint32_t root_hash;
12
13     char *mount_point;      // mount point: mount point relative to the process's root.
14     uint32_t mount_point_hash;
15
16     char *mount_options;    // mount options: per-mount options.
17
18     int optional_fields_count;
19 /*
20     char ***optional_fields; // optional fields: zero or more fields of the form "tag[:value]".
21 */
22     char *filesystem;       // filesystem type: name of filesystem in the form "type[.subtype]".
23     uint32_t filesystem_hash;
24
25     char *mount_source;     // mount source: filesystem-specific information or "none".
26     uint32_t mount_source_hash;
27
28     char *super_options;    // super options: per-superblock options.
29
30     struct mountinfo *next;
31 };
32
33 extern struct mountinfo *mountinfo_find(struct mountinfo *root, unsigned long major, unsigned long minor);
34 extern struct mountinfo *mountinfo_find_by_filesystem_mount_source(struct mountinfo *root, const char *filesystem, const char *mount_source);
35 extern struct mountinfo *mountinfo_find_by_filesystem_super_option(struct mountinfo *root, const char *filesystem, const char *super_options);
36
37 extern void mountinfo_free(struct mountinfo *mi);
38 extern struct mountinfo *mountinfo_read();
39
40 #endif /* NETDATA_PROC_SELF_MOUNTINFO_H */