1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-12-23 04:23:08 +00:00

- Fix swap size calculation on i386

- Bump PORTREVISION

PR:		ports/169174
Submitted by:	vsjcfm@gmail.com
Approved by:	maintainer (timeout,14 days)
This commit is contained in:
Michael Scheidell 2012-07-09 00:12:10 +00:00
parent 0b4cec9764
commit 5ce613c55f
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=300640
2 changed files with 3 additions and 3 deletions

View File

@ -7,7 +7,7 @@
PORTNAME= htop
PORTVERSION= 1.0.1
PORTREVISION= 1
PORTREVISION= 2
CATEGORIES= sysutils
MASTER_SITES= SF

View File

@ -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);