Received: by mail.netbsd.org (Postfix, from userid 605) id D805584D9B; Fri, 24 Nov 2017 02:06:14 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by mail.netbsd.org (Postfix) with ESMTP id 60F5F84DEA for ; Fri, 24 Nov 2017 02:06:14 +0000 (UTC) X-Virus-Scanned: amavisd-new at netbsd.org Received: from mail.netbsd.org ([127.0.0.1]) by localhost (mail.netbsd.org [127.0.0.1]) (amavisd-new, port 10025) with ESMTP id g-IT5MnjFeFv for ; Fri, 24 Nov 2017 02:06:13 +0000 (UTC) Received: from cvs.NetBSD.org (ivanova.netbsd.org [199.233.217.197]) by mail.netbsd.org (Postfix) with ESMTP id D3BC584D32 for ; Fri, 24 Nov 2017 02:06:13 +0000 (UTC) Received: by cvs.NetBSD.org (Postfix, from userid 500) id CDD94FB40; Fri, 24 Nov 2017 02:06:13 +0000 (UTC) Content-Transfer-Encoding: 7bit Content-Type: multipart/mixed; boundary="_----------=_151148917395510" MIME-Version: 1.0 Date: Fri, 24 Nov 2017 02:06:13 +0000 From: "Maya Rashish" Subject: CVS commit: pkgsrc/sysutils/htop To: pkgsrc-changes@NetBSD.org Reply-To: maya@netbsd.org X-Mailer: log_accum Message-Id: <20171124020613.CDD94FB40@cvs.NetBSD.org> Sender: pkgsrc-changes-owner@NetBSD.org List-Id: pkgsrc-changes.NetBSD.org Precedence: bulk List-Unsubscribe: This is a multi-part message in MIME format. --_----------=_151148917395510 Content-Disposition: inline Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="US-ASCII" Module Name: pkgsrc Committed By: maya Date: Fri Nov 24 02:06:13 UTC 2017 Modified Files: pkgsrc/sysutils/htop: Makefile distinfo Added Files: pkgsrc/sysutils/htop/patches: patch-linux_Platform.c Log Message: htop: workaround differences in how linux and netbsd count memory usage a bogus value is displayed for used memory as usedMem ends up as a negative quantity. use (total memory - free memory) instead. PR pkg/52669: htop displays wrong used memory To generate a diff of this commit: cvs rdiff -u -r1.15 -r1.16 pkgsrc/sysutils/htop/Makefile cvs rdiff -u -r1.10 -r1.11 pkgsrc/sysutils/htop/distinfo cvs rdiff -u -r0 -r1.1 pkgsrc/sysutils/htop/patches/patch-linux_Platform.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. --_----------=_151148917395510 Content-Disposition: inline Content-Length: 2370 Content-Transfer-Encoding: binary Content-Type: text/x-diff; charset=us-ascii Modified files: Index: pkgsrc/sysutils/htop/Makefile diff -u pkgsrc/sysutils/htop/Makefile:1.15 pkgsrc/sysutils/htop/Makefile:1.16 --- pkgsrc/sysutils/htop/Makefile:1.15 Tue Jan 31 22:24:28 2017 +++ pkgsrc/sysutils/htop/Makefile Fri Nov 24 02:06:13 2017 @@ -1,8 +1,9 @@ -# $NetBSD: Makefile,v 1.15 2017/01/31 22:24:28 maya Exp $ +# $NetBSD: Makefile,v 1.16 2017/11/24 02:06:13 maya Exp $ DISTNAME= htop-2.0.2 CATEGORIES= sysutils MASTER_SITES= http://hisham.hm/htop/releases/${PKGVERSION_NOREV}/ +PKGREVISION= 1 MAINTAINER= pkgsrc-users@NetBSD.org HOMEPAGE= http://hisham.hm/htop/ Index: pkgsrc/sysutils/htop/distinfo diff -u pkgsrc/sysutils/htop/distinfo:1.10 pkgsrc/sysutils/htop/distinfo:1.11 --- pkgsrc/sysutils/htop/distinfo:1.10 Sat Mar 25 10:53:59 2017 +++ pkgsrc/sysutils/htop/distinfo Fri Nov 24 02:06:13 2017 @@ -1,4 +1,4 @@ -$NetBSD: distinfo,v 1.10 2017/03/25 10:53:59 maya Exp $ +$NetBSD: distinfo,v 1.11 2017/11/24 02:06:13 maya Exp $ SHA1 (htop-2.0.2.tar.gz) = 201f793f13dce2448e36047079875b9bd5bba75a RMD160 (htop-2.0.2.tar.gz) = af17b9f7e1744e2db4d6a28c95cdfb9536343786 @@ -6,3 +6,4 @@ SHA512 (htop-2.0.2.tar.gz) = 1c9bf71a36c Size (htop-2.0.2.tar.gz) = 476364 bytes SHA1 (patch-TraceScreen.c) = 85f9e26c9a2ddf1e1b4df7010194a43bf622b2ea SHA1 (patch-configure.ac) = 87557f0b0027462f244cd0c9e14739d10bbfc010 +SHA1 (patch-linux_Platform.c) = d37f4f5116023fa8d8f58f6b925e4f86e9748cea Added files: Index: pkgsrc/sysutils/htop/patches/patch-linux_Platform.c diff -u /dev/null pkgsrc/sysutils/htop/patches/patch-linux_Platform.c:1.1 --- /dev/null Fri Nov 24 02:06:13 2017 +++ pkgsrc/sysutils/htop/patches/patch-linux_Platform.c Fri Nov 24 02:06:13 2017 @@ -0,0 +1,18 @@ +$NetBSD: patch-linux_Platform.c,v 1.1 2017/11/24 02:06:13 maya Exp $ + +Workaround differences in counting memory netbsd vs. linux. +PR 52669 - a bogus value is displayed for used memory because this +quantity becomes negative. + +--- linux/Platform.c.orig 2016-02-02 14:58:45.000000000 +0000 ++++ linux/Platform.c +@@ -200,7 +200,9 @@ void Platform_setMemoryValues(Meter* thi + long int usedMem = pl->usedMem; + long int buffersMem = pl->buffersMem; + long int cachedMem = pl->cachedMem; ++#ifndef __NetBSD__ + usedMem -= buffersMem + cachedMem; ++#endif + this->total = pl->totalMem; + this->values[0] = usedMem; + this->values[1] = buffersMem; --_----------=_151148917395510--