aboutsummaryrefslogtreecommitdiff
path: root/sysutils/htop
diff options
context:
space:
mode:
authorMichael Scheidell <scheidell@FreeBSD.org>2012-07-09 00:12:10 +0000
committerMichael Scheidell <scheidell@FreeBSD.org>2012-07-09 00:12:10 +0000
commit5ce613c55fc0d1ef8f86816f69057c8f9e3d65c2 (patch)
treee4bc399fd693af8f99186cde26c5456a1fe64293 /sysutils/htop
parent0b4cec976482c01337dae82ec16ec279d0a5870e (diff)
downloadports-5ce613c55fc0d1ef8f86816f69057c8f9e3d65c2.tar.gz
ports-5ce613c55fc0d1ef8f86816f69057c8f9e3d65c2.zip
- Fix swap size calculation on i386
- Bump PORTREVISION PR: ports/169174 Submitted by: vsjcfm@gmail.com Approved by: maintainer (timeout,14 days)
Notes
Notes: svn path=/head/; revision=300640
Diffstat (limited to 'sysutils/htop')
-rw-r--r--sysutils/htop/Makefile2
-rw-r--r--sysutils/htop/files/patch-ProcessList.c4
2 files changed, 3 insertions, 3 deletions
diff --git a/sysutils/htop/Makefile b/sysutils/htop/Makefile
index 3b3da745f111..d3f3b6e66877 100644
--- a/sysutils/htop/Makefile
+++ b/sysutils/htop/Makefile
@@ -7,7 +7,7 @@
PORTNAME= htop
PORTVERSION= 1.0.1
-PORTREVISION= 1
+PORTREVISION= 2
CATEGORIES= sysutils
MASTER_SITES= SF
diff --git a/sysutils/htop/files/patch-ProcessList.c b/sysutils/htop/files/patch-ProcessList.c
index bbc51abb4561..022dd9f70b0a 100644
--- a/sysutils/htop/files/patch-ProcessList.c
+++ b/sysutils/htop/files/patch-ProcessList.c
@@ -51,8 +51,8 @@
+ kd = kvm_open(NULL, _PATH_DEVNULL, NULL, O_RDONLY, NULL);
+ assert(kd != NULL);
+ kvm_getswapinfo(kd, kvmswapinfo, 1, 0);
-+ this->totalSwap = kvmswapinfo[0].ksw_total * PAGE_SIZE / KB;
-+ this->usedSwap = kvmswapinfo[0].ksw_used * PAGE_SIZE / KB;
++ this->totalSwap = kvmswapinfo[0].ksw_total * (PAGE_SIZE / KB);
++ this->usedSwap = kvmswapinfo[0].ksw_used * (PAGE_SIZE / KB);
+ kvm_close(kd);
+ len = sizeof(this->totalMem);
+ SYSCTLBYNAME("vm.stats.vm.v_page_count", this->totalMem, len);