From owner-svn-src-head@freebsd.org Fri Apr 14 21:40:31 2017 Return-Path: Delivered-To: svn-src-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 0CF6ED3C32E; Fri, 14 Apr 2017 21:40:31 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from mail.baldwin.cx (bigwig.baldwin.cx [96.47.65.170]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E07F0CF1; Fri, 14 Apr 2017 21:40:30 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from ralph.baldwin.cx (c-73-231-226-104.hsd1.ca.comcast.net [73.231.226.104]) by mail.baldwin.cx (Postfix) with ESMTPSA id 2BCDC10A7B9; Fri, 14 Apr 2017 17:40:23 -0400 (EDT) From: John Baldwin To: Ngie Cooper Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r316938 - head/sbin/savecore Date: Fri, 14 Apr 2017 14:40:18 -0700 Message-ID: <1940104.87G28XVdqf@ralph.baldwin.cx> User-Agent: KMail/4.14.10 (FreeBSD/11.0-STABLE; KDE/4.14.10; amd64; ; ) In-Reply-To: <201704141941.v3EJfmCW003347@repo.freebsd.org> References: <201704141941.v3EJfmCW003347@repo.freebsd.org> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.4.3 (mail.baldwin.cx); Fri, 14 Apr 2017 17:40:23 -0400 (EDT) X-Virus-Scanned: clamav-milter 0.99.2 at mail.baldwin.cx X-Virus-Status: Clean X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Apr 2017 21:40:31 -0000 On Friday, April 14, 2017 07:41:48 PM Ngie Cooper wrote: > Author: ngie > Date: Fri Apr 14 19:41:48 2017 > New Revision: 316938 > URL: https://svnweb.freebsd.org/changeset/base/316938 > > Log: > savecore: fix space calculation with respect to `minfree` in check_space(..) > > - Use strtoll(3) instead of atoi(3), because atoi(3) limits the > representable data to INT_MAX. Check the values received from > strtoll(3), trimming trailing whitespace off the end to maintain > POLA. > - Use `KiB` instead of `kB` when describing free space, total space, > etc. I am now fully aware of `KiB` being the IEC standard for 1024 > bytes and `kB` being the IEC standard for 1000 bytes. I will just rant lightly that no one actually uses this in the real world. Good lucking finding a "16 GiB" DIMM on crucial.com or a 4Kin drive. A kilobyte is a power of 2. The End. (Next up we'll have to rename 4k displays to 4k) -- John Baldwin