summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--devel/libgtop/files/patch-sysdeps_freebsd_open.c11
-rw-r--r--devel/libgtop/files/patch-sysdeps_freebsd_sysinfo.c6
2 files changed, 8 insertions, 9 deletions
diff --git a/devel/libgtop/files/patch-sysdeps_freebsd_open.c b/devel/libgtop/files/patch-sysdeps_freebsd_open.c
index eee11421d..fa22cc8cf 100644
--- a/devel/libgtop/files/patch-sysdeps_freebsd_open.c
+++ b/devel/libgtop/files/patch-sysdeps_freebsd_open.c
@@ -1,5 +1,5 @@
---- sysdeps/freebsd/open.c.orig 2008-09-29 13:44:47.000000000 -0400
-+++ sysdeps/freebsd/open.c 2008-09-29 13:49:37.000000000 -0400
+--- sysdeps/freebsd/open.c.orig 2008-05-23 18:13:23.000000000 -0400
++++ sysdeps/freebsd/open.c 2008-09-29 14:34:51.000000000 -0400
@@ -20,11 +20,14 @@
*/
@@ -15,7 +15,7 @@
/* !!! THIS FUNCTION RUNS SUID ROOT - CHANGE WITH CAUTION !!! */
void
-@@ -53,11 +56,18 @@ glibtop_open_p (glibtop *server, const c
+@@ -53,11 +56,17 @@ glibtop_open_p (glibtop *server, const c
const unsigned long features,
const unsigned flags)
{
@@ -28,9 +28,8 @@
/* !!! WE ARE ROOT HERE - CHANGE WITH CAUTION !!! */
+ len = sizeof (ncpus);
+ sysctlbyname ("hw.ncpu", &ncpus, &len, NULL, 0);
-+ server->ncpu = ncpus;
-+ /* XXX We should detect HTT CPUs here. */
-+ server->real_ncpu = ncpus;
++ server->real_ncpu = ncpus - 1;
++ server->ncpu = MIN(GLIBTOP_NCPU - 1, server->real_ncpu);
server->machine.uid = getuid ();
server->machine.euid = geteuid ();
diff --git a/devel/libgtop/files/patch-sysdeps_freebsd_sysinfo.c b/devel/libgtop/files/patch-sysdeps_freebsd_sysinfo.c
index 3d6026e4c..5166a1a98 100644
--- a/devel/libgtop/files/patch-sysdeps_freebsd_sysinfo.c
+++ b/devel/libgtop/files/patch-sysdeps_freebsd_sysinfo.c
@@ -1,12 +1,12 @@
---- sysdeps/freebsd/sysinfo.c.orig 2008-09-29 13:44:45.000000000 -0400
-+++ sysdeps/freebsd/sysinfo.c 2008-09-29 13:50:06.000000000 -0400
+--- stsdeps/freebsd/sysinfo.c.orig 2008-05-23 18:13:23.000000000 -0400
++++ stsdeps/freebsd/sysinfo.c 2008-09-29 14:35:25.000000000 -0400
@@ -45,8 +45,8 @@ init_sysinfo (glibtop *server)
glibtop_init_s (&server, GLIBTOP_SYSDEPS_CPU, 0);
- len = sizeof (ncpus);
- sysctlbyname ("hw.ncpu", &ncpus, &len, NULL, 0);
-+ ncpus = server->ncpu;
++ ncpus = server->ncpu + 1;
+
len = 0;
sysctlbyname ("hw.model", NULL, &len, NULL, 0);