diff options
author | marcus <marcus@FreeBSD.org> | 2002-11-02 07:52:14 +0800 |
---|---|---|
committer | marcus <marcus@FreeBSD.org> | 2002-11-02 07:52:14 +0800 |
commit | a9a6906c8a1dbea0f946a2d3563606ed22dc5c59 (patch) | |
tree | b7685ead889448cc4a336bc254e8e632e3ca9f21 /devel | |
parent | 5533ba3f288db33acb9abda9cde1e2830cc6366f (diff) | |
download | freebsd-ports-gnome-a9a6906c8a1dbea0f946a2d3563606ed22dc5c59.tar.gz freebsd-ports-gnome-a9a6906c8a1dbea0f946a2d3563606ed22dc5c59.tar.zst freebsd-ports-gnome-a9a6906c8a1dbea0f946a2d3563606ed22dc5c59.zip |
Backport the kernel memory dereference patch from libgtop2.
Diffstat (limited to 'devel')
-rw-r--r-- | devel/libgtop/Makefile | 2 | ||||
-rw-r--r-- | devel/libgtop/files/patch-ah | 28 |
2 files changed, 15 insertions, 15 deletions
diff --git a/devel/libgtop/Makefile b/devel/libgtop/Makefile index 92e36a0d8ab2..2626a4eb9bea 100644 --- a/devel/libgtop/Makefile +++ b/devel/libgtop/Makefile @@ -7,7 +7,7 @@ PORTNAME= libgtop PORTVERSION= 1.0.13 -PORTREVISION= 2 +PORTREVISION= 3 CATEGORIES= devel gnome MASTER_SITES= ${MASTER_SITE_GNOME} MASTER_SITE_SUBDIR= sources/libgtop/1.0 diff --git a/devel/libgtop/files/patch-ah b/devel/libgtop/files/patch-ah index 8b51deb9adda..db7894c05f9e 100644 --- a/devel/libgtop/files/patch-ah +++ b/devel/libgtop/files/patch-ah @@ -1,5 +1,5 @@ --- sysdeps/freebsd/procmap.c.orig Mon Nov 26 17:37:59 2001 -+++ sysdeps/freebsd/procmap.c Sat Oct 19 14:07:46 2002 ++++ sysdeps/freebsd/procmap.c Fri Nov 1 18:48:52 2002 @@ -33,7 +33,11 @@ #include <sys/proc.h> #include <sys/resource.h> @@ -12,15 +12,18 @@ #include <vm/vm_map.h> #include <sys/vnode.h> -@@ -92,7 +96,6 @@ +@@ -91,8 +95,9 @@ + glibtop_map_entry *maps; #if defined __FreeBSD__ struct vnode vnode; ++#if __FreeBSD_version < 50039 struct inode inode; - struct mount mount; ++#endif #endif int count, i = 0; int update = 0; -@@ -114,7 +117,11 @@ +@@ -114,7 +119,11 @@ /* Now we get the memory maps. */ if (kvm_read (server->machine.kd, @@ -32,21 +35,18 @@ (char *) &vmspace, sizeof (vmspace)) != sizeof (vmspace)) glibtop_error_io_r (server, "kvm_read (vmspace)"); -@@ -217,7 +224,7 @@ - if (!vnode.v_uvm.u_flags & UVM_VNODE_VALID) - continue; - -- if ((vnode.v_type != VREG) || (vnode.v_tag != VT_UFS) || -+ if ((vnode.v_type != VREG) || strcmp("ufs", vnode.v_tag) || - !vnode.v_data) continue; - - if (kvm_read (server->machine.kd, -@@ -244,18 +251,17 @@ +@@ -244,18 +253,23 @@ &vnode, sizeof (vnode)) != sizeof (vnode)) glibtop_error_io_r (server, "kvm_read (vnode)"); +#if __FreeBSD_version >= 500039 -+ if ((vnode.v_type != VREG) || strcmp("ufs", vnode.v_tag) || ++ switch (vnode.v_type) { ++ case VREG: ++ maps [i-1].inode = vnode.v_cachedid; ++ maps [i-1].device = vnode.v_cachedfs; ++ default: ++ continue; ++ } +#else if ((vnode.v_type != VREG) || (vnode.v_tag != VT_UFS) || +#endif |