| … | |
… | |
| 5 | Copyright 2007 Gentoo Foundation |
5 | Copyright 2007 Gentoo Foundation |
| 6 | */ |
6 | */ |
| 7 | |
7 | |
| 8 | #define APPLET "mountinfo" |
8 | #define APPLET "mountinfo" |
| 9 | |
9 | |
|
|
10 | #if defined(__DragonFly__) || defined(__FreeBSD__) || \ |
|
|
11 | defined(__NetBSD__) || defined(__OpenBSD__) |
|
|
12 | #define BSD |
|
|
13 | |
| 10 | #include <sys/types.h> |
14 | #include <sys/types.h> |
| 11 | #if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) |
|
|
| 12 | #include <sys/param.h> |
15 | #include <sys/param.h> |
| 13 | #include <sys/ucred.h> |
16 | #include <sys/ucred.h> |
| 14 | #include <sys/mount.h> |
17 | #include <sys/mount.h> |
| 15 | #elif defined(__linux__) |
18 | #elif defined(__linux__) |
| 16 | #include <limits.h> |
19 | #include <limits.h> |
| … | |
… | |
| 28 | #include "rc.h" |
31 | #include "rc.h" |
| 29 | #include "rc-misc.h" |
32 | #include "rc-misc.h" |
| 30 | #include "strlist.h" |
33 | #include "strlist.h" |
| 31 | |
34 | |
| 32 | |
35 | |
| 33 | #if defined(__FreeBSD__) || defined(__NetBSD__) || defined (__OpenBSD__) |
36 | #ifdef BSD |
| 34 | static char **find_mounts (regex_t *node_regex, regex_t *skip_node_regex, |
37 | static char **find_mounts (regex_t *node_regex, regex_t *skip_node_regex, |
| 35 | regex_t *fstype_regex, regex_t *skip_fstype_regex, |
38 | regex_t *fstype_regex, regex_t *skip_fstype_regex, |
| 36 | char **mounts, bool node, bool fstype) |
39 | char **mounts, bool node, bool fstype) |
| 37 | { |
40 | { |
| 38 | struct statfs *mnts; |
41 | struct statfs *mnts; |