View | Details | Raw Unified | Return to bug 242533 | Differences between
and this patch

Collapse All | Expand All

(-)files/patch-sysdeps_freebsd_procmap.c (-27 / +41 lines)
Lines 1-31 Link Here
1
--- sysdeps/freebsd/procmap.c.orig	2015-08-17 18:59:37 UTC
1
--- sysdeps/freebsd/procmap.c.orig	2019-12-15 10:57:39.269809000 -0500
2
+++ sysdeps/freebsd/procmap.c
2
+++ sysdeps/freebsd/procmap.c	2019-12-15 11:00:33.580621000 -0500
3
@@ -52,6 +52,8 @@
3
@@ -273,10 +273,18 @@
4
 #include <sys/mount.h>
4
                 return NULL;
5
 #include <ufs/ufs/quota.h>
5
         }
6
 #include <ufs/ufs/inode.h>
6
 
7
+#include <ufs/ufs/extattr.h>
7
+#if (__FreeBSD_version >= 1300062)
8
+#include <ufs/ufs/ufsmount.h>
8
+        first = vmspace.vm_map.header.right;
9
 #include <fs/devfs/devfs.h>
10
 #if (__FreeBSD_version >= 600006) || defined(__FreeBSD_kernel__)
11
 #include <fs/devfs/devfs_int.h>
12
@@ -86,6 +88,8 @@ _glibtop_sysdeps_freebsd_dev_inode (glib
13
         struct cdev_priv priv;
14
 #if __FreeBSD_version < 800039
15
         struct cdev si;
16
+#else
9
+#else
17
+        struct ufsmount um;
10
         first = vmspace.vm_map.header.next;
18
 #endif
11
+#endif
19
 
12
 
20
         *inum = 0;
13
         if (kvm_read (server->machine->kd,
21
@@ -167,7 +171,9 @@ _glibtop_sysdeps_freebsd_dev_inode (glib
14
+#if (__FreeBSD_version >= 1300062)
15
+                        (gulong) vmspace.vm_map.header.right,
16
+#else
17
                         (gulong) vmspace.vm_map.header.next,
18
+#endif
19
                         (char *) &entry, sizeof (entry)) != sizeof (entry)) {
20
                 glibtop_warn_io_r (server, "kvm_read (entry)");
21
 		glibtop_suid_leave (server);
22
@@ -299,7 +307,11 @@
22
 
23
 
24
                 if (update) {
25
                         if (kvm_read (server->machine->kd,
26
+#if (__FreeBSD_version >= 1300062)
27
+                                        (gulong) entry.right,
28
+#else
29
                                         (gulong) entry.next,
30
+#endif
31
                                         (char *) &entry, sizeof (entry)) != sizeof (entry)) {
32
                                 glibtop_warn_io_r (server, "kvm_read (entry)");
33
                                 continue;
34
@@ -377,7 +389,11 @@
35
                 if (entry.protection & VM_PROT_EXECUTE)
36
                         mentry->perm |= GLIBTOP_MAP_PERM_EXECUTE;
23
 
37
 
24
 #if (__FreeBSD_version >= 800039) || (__FreeBSD_kernel_version >= 800039)
38
+#if (__FreeBSD_version >= 1300062)
25
-        if (kvm_read (server->machine->kd, (gulong) cdev2priv(inode.i_dev), (char *) &priv,
39
+        } while (entry.right != first);
26
+        if (kvm_read (server->machine->kd, (gulong) inode.i_ump, (char *) &um,
40
+#else
27
+		      sizeof (um)) != sizeof (um) ||
41
         } while (entry.next != first);
28
+            kvm_read (server->machine->kd, (gulong) cdev2priv(um.um_dev), (char *) &priv,
42
+#endif
29
 		      sizeof (priv))
43
 
30
 #else
44
         glibtop_suid_leave (server);
31
         if (kvm_read (server->machine->kd, (gulong) inode.i_dev, (char *) &si,
45
 

Return to bug 242533