From owner-svn-ports-head@freebsd.org Fri Sep 18 14:46:57 2015 Return-Path: Delivered-To: svn-ports-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 649CE9CD55F; Fri, 18 Sep 2015 14:46:57 +0000 (UTC) (envelope-from amdmi3@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 493B61286; Fri, 18 Sep 2015 14:46:57 +0000 (UTC) (envelope-from amdmi3@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t8IEkv4N094368; Fri, 18 Sep 2015 14:46:57 GMT (envelope-from amdmi3@FreeBSD.org) Received: (from amdmi3@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t8IEku6V094364; Fri, 18 Sep 2015 14:46:56 GMT (envelope-from amdmi3@FreeBSD.org) Message-Id: <201509181446.t8IEku6V094364@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: amdmi3 set sender to amdmi3@FreeBSD.org using -f From: Dmitry Marakasov Date: Fri, 18 Sep 2015 14:46:56 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r397247 - in head/sysutils/rmonitor: . files X-SVN-Group: ports-head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the ports tree for head List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 18 Sep 2015 14:46:57 -0000 Author: amdmi3 Date: Fri Sep 18 14:46:56 2015 New Revision: 397247 URL: https://svnweb.freebsd.org/changeset/ports/397247 Log: - Drop 8.x support Approved by: portmgr blanket Added: head/sysutils/rmonitor/files/patch-utmpx - copied unchanged from r397114, head/sysutils/rmonitor/files/extra-patch-utmpx Deleted: head/sysutils/rmonitor/files/extra-patch-utmpx Modified: head/sysutils/rmonitor/Makefile Modified: head/sysutils/rmonitor/Makefile ============================================================================== --- head/sysutils/rmonitor/Makefile Fri Sep 18 14:46:55 2015 (r397246) +++ head/sysutils/rmonitor/Makefile Fri Sep 18 14:46:56 2015 (r397247) @@ -15,15 +15,9 @@ LICENSE= BSD4CLAUSE CFLAGS+= -w -.include - -.if ${OSVERSION} >= 900007 -EXTRA_PATCHES+= ${FILESDIR}/extra-patch-utmpx -.endif - do-install: ${INSTALL_PROGRAM} ${WRKSRC}/bin/rmonitor ${STAGEDIR}${PREFIX}/bin/rmonitor ${INSTALL_MAN} ${WRKSRC}/man/rmonitor.1.gz ${STAGEDIR}${MAN1PREFIX}/man/man1/rmonitor.1.gz ${INSTALL_SCRIPT} ${WRKSRC}/etc/rmonitor.sh ${STAGEDIR}${PREFIX}/etc/rc.d/rmonitor.sh -.include +.include Copied: head/sysutils/rmonitor/files/patch-utmpx (from r397114, head/sysutils/rmonitor/files/extra-patch-utmpx) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sysutils/rmonitor/files/patch-utmpx Fri Sep 18 14:46:56 2015 (r397247, copy of r397114, head/sysutils/rmonitor/files/extra-patch-utmpx) @@ -0,0 +1,51 @@ +--- src/rmonitor.c ++++ src/rmonitor.c +@@ -88,7 +88,7 @@ + #include + #include + #include +-#include ++#include + + + #define DEFTOL 2.5 /* default tolerance */ +@@ -300,7 +300,7 @@ + int memfre = 0; + int memtot = 0; + int memuse = 0; +- int nu = -1; ++ int nu = 0; + int np = -1; + int openf = -1; + int pgcnt = 0; +@@ -309,9 +309,8 @@ + int pgsize = 0; + int slvl = 0; + int vn[3]; +- int utfd; + time_t ct; +- struct utmp utmprec; ++ struct utmpx *utmprec; + + union { + char buf[STRLEN]; +@@ -402,14 +401,12 @@ + + if (getloadavg(lavg, samples) != samples) errmsg("getloadavg"); + +- if ((utfd = open(_PATH_UTMP, O_RDONLY)) >= 0) { +- nu = 0; +- while (read(utfd, &utmprec, sizeof utmprec) > 0) +- if (*(utmprec.ut_name)) nu++; +- if (close(utfd) < 0) errmsg("close"); ++ setutxent(); ++ while ((utmprec = getutxent()) != NULL) { ++ if (utmprec->ut_type == USER_PROCESS) ++ nu++; + } +- else +- errmsg("open"); ++ endutxent(); + + #if __FreeBSD_version >= 420000 + snprintf(stat, STRLEN,