pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/sysutils/xosview - don't use kmem to get uvmexp; use s...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/4cbd3b046ab9
branches:  trunk
changeset: 520744:4cbd3b046ab9
user:      christos <christos%pkgsrc.org@localhost>
date:      Sat Oct 28 02:15:12 2006 +0000

description:
- don't use kmem to get uvmexp; use sysctl
- don't define UVM, it is done in the top level Makefile

diffstat:

 sysutils/xosview/distinfo         |   5 +++--
 sysutils/xosview/patches/patch-aa |  19 +++++--------------
 sysutils/xosview/patches/patch-ab |  29 +++++++++++++++++++++++++++++
 3 files changed, 37 insertions(+), 16 deletions(-)

diffs (88 lines):

diff -r 13037c554032 -r 4cbd3b046ab9 sysutils/xosview/distinfo
--- a/sysutils/xosview/distinfo Sat Oct 28 02:04:31 2006 +0000
+++ b/sysutils/xosview/distinfo Sat Oct 28 02:15:12 2006 +0000
@@ -1,6 +1,7 @@
-$NetBSD: distinfo,v 1.18 2006/06/05 20:20:26 christos Exp $
+$NetBSD: distinfo,v 1.19 2006/10/28 02:15:12 christos Exp $
 
 SHA1 (xosview-1.8.3.tar.gz) = 420fd0620ff9fb9ba83fc833eeb8b872414e377e
 RMD160 (xosview-1.8.3.tar.gz) = 595e812dee686ccaa5d95eb537782679d752271b
 Size (xosview-1.8.3.tar.gz) = 259793 bytes
-SHA1 (patch-aa) = 5a97b1a82b511d856c93dc07ed1e2d25d8556427
+SHA1 (patch-aa) = c51d8b0b033943911869aa2d262804eeeec9c109
+SHA1 (patch-ab) = 274b83fd3488af8e0c4ce0184b8c78f4f6ef87df
diff -r 13037c554032 -r 4cbd3b046ab9 sysutils/xosview/patches/patch-aa
--- a/sysutils/xosview/patches/patch-aa Sat Oct 28 02:04:31 2006 +0000
+++ b/sysutils/xosview/patches/patch-aa Sat Oct 28 02:15:12 2006 +0000
@@ -1,17 +1,8 @@
-$NetBSD: patch-aa,v 1.14 2006/06/05 20:20:26 christos Exp $
+$NetBSD: patch-aa,v 1.15 2006/10/28 02:15:12 christos Exp $
 
 --- bsd/kernel.cc.orig 2006-02-18 02:36:06.000000000 -0500
-+++ bsd/kernel.cc      2006-06-05 16:17:01.000000000 -0400
-@@ -21,6 +21,8 @@
- /*  NetBSD pulls in stdio.h via one of the other includes, but
-  *  the other BSDs don't.  */
- # include <stdio.h>
-+#else
-+# define UVM
- #endif
- 
- #include <fcntl.h>
-@@ -115,6 +117,13 @@
++++ bsd/kernel.cc      2006-10-27 22:12:37.000000000 -0400
+@@ -115,6 +115,13 @@
  // in __NetBSD_Version__ for us if needed.
  #if defined(XOSVIEW_NETBSD) && defined(__NetBSD_Version__) && (__NetBSD_Version__ >= 106010000)
  #define NETBSD_1_6A
@@ -25,7 +16,7 @@
  #endif
  
  #include "general.h"
-@@ -773,13 +782,12 @@
+@@ -773,13 +780,12 @@
  #ifdef NETBSD_1_6A
    // Do a sysctl with a NULL data pointer to get the size that would
    // have been returned, and use that to figure out # drives.
@@ -41,7 +32,7 @@
    return 1;
  #endif
    return ValidSymbol(DISKLIST_SYM_INDEX);
-@@ -816,19 +824,29 @@
+@@ -816,19 +822,29 @@
  #else
  #if defined(NETBSD_1_6A)
    // Use the new sysctl to do this for us.
diff -r 13037c554032 -r 4cbd3b046ab9 sysutils/xosview/patches/patch-ab
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/sysutils/xosview/patches/patch-ab Sat Oct 28 02:15:12 2006 +0000
@@ -0,0 +1,29 @@
+$NetBSD: patch-ab,v 1.12 2006/10/28 02:15:12 christos Exp $
+
+--- bsd/memmeter.cc.orig       2002-07-13 23:48:45.000000000 -0400
++++ bsd/memmeter.cc    2006-10-27 22:09:54.000000000 -0400
+@@ -77,7 +77,7 @@
+   struct vmtotal meminfo;
+   int params[] = {CTL_VM, VM_METER};
+   size_t meminfosize = sizeof (struct vmtotal);
+-  sysctl (params, 2, &meminfo, &meminfosize, NULL, NULL);
++  sysctl (params, 2, &meminfo, &meminfosize, NULL, 0);
+   /*  Note that the numbers are in terms of 4K pages.  */
+ 
+   total_ = 4096*(meminfo.t_free+meminfo.t_rm);
+@@ -91,8 +91,15 @@
+    *  this, and later we'll add all the common fields to this.  */
+   total_ = 0.0;
+ #if defined(UVM) && (defined(XOSVIEW_NETBSD) || defined(XOSVIEW_OPENBSD))
++#ifdef VM_UVMEXP2
++  int params[] = {CTL_VM, VM_UVMEXP2};
++  struct uvmexp_sysctl kvm_uvm_exp;
++  size_t kvm_uvm_exp_size = sizeof (kvm_uvm_exp);
++  sysctl (params, 2, &kvm_uvm_exp, &kvm_uvm_exp_size, NULL, 0);
++#else
+   struct uvmexp kvm_uvm_exp;
+   BSDGetUVMPageStats(&kvm_uvm_exp);
++#endif
+   int pgsize = kvm_uvm_exp.pagesize;
+   fields_[0] = kvm_uvm_exp.active*pgsize;
+   fields_[1] = kvm_uvm_exp.inactive*pgsize;



Home | Main Index | Thread Index | Old Index