FreeBSD Bugzilla – Attachment 210008 Details for
Bug 242533
devel/libgtop: error: no member named 'next' in 'struct vm_map_entry
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch: make devel/libgtop use right instead of next in struct vm_map_entry (Revision 3)
libgtop-4.patch (text/plain), 3.96 KB, created by
Neel Chauhan
on 2019-12-17 16:03:50 UTC
(
hide
)
Description:
Patch: make devel/libgtop use right instead of next in struct vm_map_entry (Revision 3)
Filename:
MIME Type:
Creator:
Neel Chauhan
Created:
2019-12-17 16:03:50 UTC
Size:
3.96 KB
patch
obsolete
>Index: files/patch-sysdeps_freebsd_procmap.c >=================================================================== >--- files/patch-sysdeps_freebsd_procmap.c (revision 520332) >+++ files/patch-sysdeps_freebsd_procmap.c (working copy) >@@ -1,31 +1,88 @@ >---- sysdeps/freebsd/procmap.c.orig 2015-08-17 18:59:37 UTC >-+++ sysdeps/freebsd/procmap.c >-@@ -52,6 +52,8 @@ >- #include <sys/mount.h> >- #include <ufs/ufs/quota.h> >- #include <ufs/ufs/inode.h> >-+#include <ufs/ufs/extattr.h> >-+#include <ufs/ufs/ufsmount.h> >- #include <fs/devfs/devfs.h> >- #if (__FreeBSD_version >= 600006) || defined(__FreeBSD_kernel__) >- #include <fs/devfs/devfs_int.h> >-@@ -86,6 +88,8 @@ _glibtop_sysdeps_freebsd_dev_inode (glib >- struct cdev_priv priv; >- #if __FreeBSD_version < 800039 >- struct cdev si; >-+#else >-+ struct ufsmount um; >+--- sysdeps/freebsd/procmap.c.orig 2017-08-07 18:43:41.000000000 -0400 >++++ sysdeps/freebsd/procmap.c 2019-12-17 10:47:46.013150000 -0500 >+@@ -66,7 +66,6 @@ >+ #undef _KERNEL > #endif > >- *inum = 0; >-@@ -167,7 +171,9 @@ _glibtop_sysdeps_freebsd_dev_inode (glib >+- >+ #include <sys/ucred.h> >+ #include <sys/sysctl.h> > >+@@ -231,6 +230,21 @@ >+ server->sysdeps.proc_map = _glibtop_sysdeps_proc_map; >+ } > >- #if (__FreeBSD_version >= 800039) || (__FreeBSD_kernel_version >= 800039) >-- if (kvm_read (server->machine->kd, (gulong) cdev2priv(inode.i_dev), (char *) &priv, >-+ if (kvm_read (server->machine->kd, (gulong) inode.i_ump, (char *) &um, >-+ sizeof (um)) != sizeof (um) || >-+ kvm_read (server->machine->kd, (gulong) cdev2priv(um.um_dev), (char *) &priv, >- sizeof (priv)) >- #else >- if (kvm_read (server->machine->kd, (gulong) inode.i_dev, (char *) &si, >++#if (__FreeBSD_version >= 1300062) >++static int >++procstat_vm_map_reader(void *token, vm_map_entry_t addr, vm_map_entry_t dest) >++{ >++ kvm_t *kd; >++ size_t nbytes = sizeof (*dest); >++ >++ if (nbytes >= SSIZE_MAX) >++ return (0); >++ >++ kd = (kvm_t *) token; >++ return (kvm_read (kd, (unsigned long) addr, dest, nbytes) == nbytes); >++} >++#endif >++ >+ /* Provides detailed information about a process. */ >+ >+ glibtop_map_entry * >+@@ -245,6 +259,10 @@ >+ struct vnode vnode; >+ int count; >+ int update = 0; >++#if (__FreeBSD_version >= 1300062) >++ vm_map_entry_t entryp; >++ struct vm_map_entry *entryn; >++#endif >+ >+ memset (buf, 0, sizeof (glibtop_proc_map)); >+ >+@@ -273,10 +291,20 @@ >+ return NULL; >+ } >+ >++#if (__FreeBSD_version >= 1300062) >++ entryp = vm_map_entry_read_succ (server->machine->kd, entryn, >++ procstat_vm_map_reader); >++ first = entryn; >++#else >+ first = vmspace.vm_map.header.next; >++#endif >+ >+ if (kvm_read (server->machine->kd, >++#if (__FreeBSD_version >= 1300062) >++ (gulong) entryn, >++#else >+ (gulong) vmspace.vm_map.header.next, >++#endif >+ (char *) &entry, sizeof (entry)) != sizeof (entry)) { >+ glibtop_warn_io_r (server, "kvm_read (entry)"); >+ glibtop_suid_leave (server); >+@@ -299,7 +327,11 @@ >+ >+ if (update) { >+ if (kvm_read (server->machine->kd, >++#if (__FreeBSD_version >= 1300062) >++ (gulong) entryn, >++#else >+ (gulong) entry.next, >++#endif >+ (char *) &entry, sizeof (entry)) != sizeof (entry)) { >+ glibtop_warn_io_r (server, "kvm_read (entry)"); >+ continue; >+@@ -377,7 +409,11 @@ >+ if (entry.protection & VM_PROT_EXECUTE) >+ mentry->perm |= GLIBTOP_MAP_PERM_EXECUTE; >+ >++#if (__FreeBSD_version >= 1300062) >++ } while (entryn != first); >++#else >+ } while (entry.next != first); >++#endif >+ >+ glibtop_suid_leave (server); >+
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 242533
:
209816
|
209828
|
209957
|
209975
|
210008
|
210013
|
210019
|
210610
|
210676
Working