From owner-svn-src-all@freebsd.org Thu Jan 16 06:47:07 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id DCBDA22B248; Thu, 16 Jan 2020 06:47:07 +0000 (UTC) (envelope-from philip@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 47yvrC5VrFz4XWY; Thu, 16 Jan 2020 06:47:07 +0000 (UTC) (envelope-from philip@freebsd.org) Received: from weatherwax.trouble.is (weatherwax.trouble.is [IPv6:2a00:1098:82:3a::1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "weatherwax.trouble.is", Issuer "Let's Encrypt Authority X3" (verified OK)) (Authenticated sender: philip/mail) by smtp.freebsd.org (Postfix) with ESMTPSA id A1B5D1E7BA; Thu, 16 Jan 2020 06:47:07 +0000 (UTC) (envelope-from philip@freebsd.org) Received: from rincewind.trouble.is (rincewind.trouble.is [IPv6:2a01:4f9:2a:1715::1:1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits)) (Client CN "rincewind.trouble.is", Issuer "Let's Encrypt Authority X3" (verified OK)) by weatherwax.trouble.is (Postfix) with ESMTPS id 47yvrB4S6fz1SbJ; Thu, 16 Jan 2020 06:47:06 +0000 (UTC) Received: by rincewind.trouble.is (Postfix, authenticated sender philip) id 47yvr770TSz4JgM; Thu, 16 Jan 2020 06:47:03 +0000 (UTC) From: "Philip Paeps" To: "=?utf-8?q?T=C4=B3l?= Coosemans" Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r355978 - head/usr.bin/top Date: Thu, 16 Jan 2020 16:46:59 +1000 X-Clacks-Overhead: GNU Terry Pratchett X-Mailer: MailMate (1.13.1r5676) Message-ID: In-Reply-To: <20200115190958.13a33cb4@FreeBSD.org> References: <201912210503.xBL53LCh072168@repo.freebsd.org> <20200115190958.13a33cb4@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: quoted-printable X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Jan 2020 06:47:07 -0000 On 2020-01-16 04:09:58 (+1000), T=C4=B3l Coosemans wrote: > On Sat, 21 Dec 2019 05:03:21 +0000 (UTC) Philip Paeps > wrote: >> Author: philip >> Date: Sat Dec 21 05:03:21 2019 >> New Revision: 355978 >> URL: https://svnweb.freebsd.org/changeset/base/355978 >> >> Log: >> top: display battery capacity remaining >> >> Submitted by: Antranig Vartanian >> Reviewed by: imp, philip >> Differential Revision: https://reviews.freebsd.org/D22871 >> >> Modified: >> head/usr.bin/top/display.c >> head/usr.bin/top/display.h >> head/usr.bin/top/machine.c >> head/usr.bin/top/machine.h >> head/usr.bin/top/top.c >> >> Modified: head/usr.bin/top/display.c >> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D >> --- head/usr.bin/top/display.c Sat Dec 21 04:44:17 2019 (r355977) >> +++ head/usr.bin/top/display.c Sat Dec 21 05:03:21 2019 (r355978) >> @@ -1322,6 +1322,15 @@ i_uptime(struct timeval *bt, time_t *tod) >> } >> } >> >> +void >> +i_battery(int nbat, int batt) >> +{ >> + >> + if (nbat > 0) { >> + printf("; battery: %d%%", batt); > > It doesn't fit. There's only room for "; b": > > last pid: 33047; load averages: 1.17, 1.25, 1.34; b up 3+07:35:37 = > 19:08:41 Whoops. Yeah. I just noticed too. (I only did very cursory testing of = this patch - I tend not to run FreeBSD on battery-powered devices = often). I'll shuffle this around a bit. Philip -- = Philip Paeps Senior Reality Engineer Alternative Enterprises