Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 16 Jan 2020 16:46:59 +1000
From:      "Philip Paeps" <philip@freebsd.org>
To:        "=?utf-8?q?T=C4=B3l?= Coosemans" <tijl@FreeBSD.org>
Cc:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   Re: svn commit: r355978 - head/usr.bin/top
Message-ID:  <E49D8D0C-F34A-48C0-901C-36EB6CBC666C@freebsd.org>
In-Reply-To: <20200115190958.13a33cb4@FreeBSD.org>
References:  <201912210503.xBL53LCh072168@repo.freebsd.org> <20200115190958.13a33cb4@FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help
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
> <philip@FreeBSD.org> 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 <antranigv@freebsd.am>
>>   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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?E49D8D0C-F34A-48C0-901C-36EB6CBC666C>