1 #ifndef MOUNTPOINT_H
2 #define MOUNTPOINT_H
3 
4 struct mountpoint {
5 	char *device_path;
6 	char *mount_path;
7 	char *type;
8 	dev_t dev;
9 	unsigned int block_size; /* may not be set for iteration */
10 };
11 
12 /* Returns 1 = found, 0 = not found (from mount tabs, or the path itself),
13    -1 = error */
14 int mountpoint_get(const char *path, pool_t pool, struct mountpoint *point_r);
15 
16 /* Iterate through mountpoints */
17 struct mountpoint_iter *mountpoint_iter_init(void);
18 /* Returns the next mountpoint or NULL if there are no more. */
19 const struct mountpoint *mountpoint_iter_next(struct mountpoint_iter *iter);
20 /* Returns 0 if mountpoints were iterated successfully, -1 if it failed. */
21 int mountpoint_iter_deinit(struct mountpoint_iter **iter);
22 
23 #endif
24