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
39
40
41
42
43
44
45
46
47
|
$NetBSD: patch-ac,v 1.7 2016/04/07 11:54:57 youri Exp $
--- sysdeps/common/mountlist.c.orig 2011-06-01 15:40:47.000000000 +0000
+++ sysdeps/common/mountlist.c
@@ -105,8 +105,12 @@ static struct mount_entry *read_filesyst
#define MOUNTED_GETMNTTBL
#endif
+#ifdef __APPLE__
+#define statvfs statfs
+#endif
+
-#if defined (MOUNTED_GETMNTINFO) && !defined (__NetBSD__) && !defined (__OpenBSD__) && !defined(__FreeBSD__)
+#if defined (MOUNTED_GETMNTINFO) && !defined (__NetBSD__) && !defined (__OpenBSD__) && !defined(__FreeBSD__) && !defined(__DragonFly__)
static const char *
fstype_to_string (short t)
{
@@ -298,7 +302,11 @@ read_filesystem_list (void)
#ifdef MOUNTED_GETMNTINFO /* 4.4BSD. */
{
+#if defined(STAT_STATVFS) && !defined(__DragonFly__)
+ struct statvfs *fsp;
+#else
struct statfs *fsp;
+#endif
int entries;
entries = getmntinfo (&fsp, MNT_NOWAIT);
@@ -309,7 +317,7 @@ read_filesystem_list (void)
me = (struct mount_entry *) g_malloc (sizeof (struct mount_entry));
me->me_devname = g_strdup (fsp->f_mntfromname);
me->me_mountdir = g_strdup (fsp->f_mntonname);
-#if defined(__NetBSD__) || defined(__OpenBSD__) || defined(__FreeBSD__)
+#if defined(__NetBSD__) || defined(__OpenBSD__) || defined(__FreeBSD__) || defined(__DragonFly__)
me->me_type = g_strdup (fsp->f_fstypename);
#else
me->me_type = g_strdup (fstype_to_string (fsp->f_type));
@@ -544,6 +552,7 @@ static gboolean ignore_mount_entry(const
"devfs",
"devpts",
"fusectl",
+ "kernfs",
"linprocfs",
"mfs",
"mntfs",
|