From owner-svn-src-head@freebsd.org Sat Apr 15 02:49:22 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 EFBEDD3EFA0; Sat, 15 Apr 2017 02:49:22 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: from mail-pf0-x241.google.com (mail-pf0-x241.google.com [IPv6:2607:f8b0:400e:c00::241]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id ADFD7C06; Sat, 15 Apr 2017 02:49:22 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: by mail-pf0-x241.google.com with SMTP id c198so17213818pfc.0; Fri, 14 Apr 2017 19:49:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:mime-version:from:in-reply-to:date:cc:message-id:references :to; bh=p3uIRJNIMPh8x9A/tfe7L9yK2ok5amYDkfg7ABq5Oj0=; b=BA43LuDtg+iIVTkF7cVP9pot0Dc2nK0o7sfxPl/vky6OoGXRqyS8snyRRBee0j4Uqy gWi9pUpfQCW4Ru0imL5fPKJP23xarVNONtYrtQbeVD83XyE8N/pSOWnj28466K/if3sF MHqyBgC/+06Dr6n0xiBJ0O+J2nBcSWaIf1JVTuYGAomD5l6Qi5Yz2m/tN2ZM/YRsorww Nxx6eyFGXcWmjmupYCOBI2xhBYI39MJysufpB2KvlH9vNP0IEieFhrLNDs2G1F4Q1nHc LJH4t+jbbiCvqgVEKg6ERxjcGpm6RxTA4pFQNnHSOp0Y/ViFomqplqLspQWy73rA+Y3C PdjQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:mime-version:from:in-reply-to:date:cc :message-id:references:to; bh=p3uIRJNIMPh8x9A/tfe7L9yK2ok5amYDkfg7ABq5Oj0=; b=uKiTuVcbd1fu2G99pvntk0cpLEViMaTrj/cMxyfw73AXS3jpZnit5iN+0dBfNaaU16 cfCIHFEQW2gHqYqj/RcO0mbsSSzTiepaF25J16zwSKpHIS2cCQJc45kuDKkSXRCEie/r 3KVe84nwcljDYlHbr/aQLLgdvVqiNt028zZ0or6KjI63Dos0V6TOmFLgA145aWk2OTll tkocJuMGh6YDnyJNxJoUa6OjWhaYMvKNIeFuR553vme2kQrfQX2aEduHbjnW1HzNOz4A G8ksPf41+ki4Mg3J5IlV7WDB3XbQAnrrpt8VdBFZWerQIT2Mm9sCRQpap0jmCDXZUeZH B+Bw== X-Gm-Message-State: AN3rC/6UYHY7rFTzmmnGSwR+G01225qbFCGZerxR0nIDHTgxVeS/Dmd9 +fZRgqQLU/sdSRqta9c= X-Received: by 10.99.104.69 with SMTP id d66mr668400pgc.93.1492224562051; Fri, 14 Apr 2017 19:49:22 -0700 (PDT) Received: from pinklady.local (c-73-19-52-228.hsd1.wa.comcast.net. [73.19.52.228]) by smtp.gmail.com with ESMTPSA id e76sm5396308pfk.75.2017.04.14.19.49.21 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 14 Apr 2017 19:49:21 -0700 (PDT) Subject: Re: svn commit: r316938 - head/sbin/savecore Mime-Version: 1.0 (Mac OS X Mail 9.3 \(3124\)) Content-Type: multipart/signed; boundary="Apple-Mail=_7EEE690C-291E-4F6A-BEAF-F17DAD12193F"; protocol="application/pgp-signature"; micalg=pgp-sha512 X-Pgp-Agent: GPGMail From: "Ngie Cooper (yaneurabeya)" In-Reply-To: <4CBF25DF-F407-4F50-8724-B73F64734E19@gmail.com> Date: Fri, 14 Apr 2017 19:49:20 -0700 Cc: John Baldwin , Ngie Cooper , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Message-Id: <62071184-0DDD-4996-867E-866BF1F8DC25@gmail.com> References: <201704150149.v3F1nu0D009274@pdx.rh.CN85.dnsmgr.net> <4CBF25DF-F407-4F50-8724-B73F64734E19@gmail.com> To: rgrimes@freebsd.org X-Mailer: Apple Mail (2.3124) 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: Sat, 15 Apr 2017 02:49:23 -0000 --Apple-Mail=_7EEE690C-291E-4F6A-BEAF-F17DAD12193F Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 > On Apr 14, 2017, at 19:40, Ngie Cooper (yaneurabeya) = wrote: >=20 >>=20 >> On Apr 14, 2017, at 18:49, Rodney W. Grimes = wrote: >>=20 >>> 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 >>>>=20 >>>> Log: >>>> savecore: fix space calculation with respect to `minfree` in = check_space(..) >>>>=20 >>>> - 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. >>>=20 >>> I will just rant lightly that no one actually uses this in the real = world. >>>=20 >>> Good lucking finding a "16 GiB" DIMM on crucial.com or a 4Kin drive. = A >>> kilobyte is a power of 2. The End. >>>=20 >>> (Next up we'll have to rename 4k displays to >>> 4k) >>=20 >> Do we use KiB, MiB, GiB,... any place else in the system? I cant = think of >> a place we do this, so please, lets not start doing this here? >=20 > humanize_number(3) from libutil uses IEC units. >=20 >> Yes, these are newer standards, perhaps some day we should make a = global >> switch to them, but lets not start mixing and matching things. >=20 > I understand and agree. I=E2=80=99m not 100% sold on that one way or = another, but since I was going to redo the number representation in save = core with humanize_number(3), because reading `KiB` is = not ideal usability wise, and I don=E2=80=99t want to reinvent the wheel = normalizing numbers and printing out the unit. *unit. =E2=80=94> *unit, KiB seemed like a logical next step after = discussing it at long length in the CR. -Ngie --Apple-Mail=_7EEE690C-291E-4F6A-BEAF-F17DAD12193F Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP using GPGMail -----BEGIN PGP SIGNATURE----- Comment: GPGTools - https://gpgtools.org iQIcBAEBCgAGBQJY8YowAAoJEPWDqSZpMIYVdU0QAMtoqa/sNeFe4pWmE4zMlH7C phHTNmNrYYGi7Uy0y0FoD7QsXW50JnBMK/EzpaEsZ5qZcJVHUwgGbzQChfcYtYNg lb57F8ma3RG/bQbXfgoNS5vhVUQeqJXUW/6S3/eRJxpnHck7okncs850ON0zyX+s jXEEbV2n6MiqwPkfpWE61h7H6IbNao1rxa4qfZtuIkne+ZmGZ85VR3F0ufAnu8ab g0b0Jf7+LtZCf6f50242kUa/g4y2u9J/3l8fqlA+jxj5kgmwwdSw6x35J9cqtgmV SpOz5SxBhLwIV2xKBwB544KDivL4u6HsO3vVLWVZxzX2xRDN7U574GlUlOeoON2p me3KON4lkKi+mv+2S2K6tYnSQHg61SSlMpF1yI/ncG2s1UW8Cq1H7sX/icQ1Gw9B Lu717C1gKVPN2liKVudUzpWOdnvPlnliyiE2FT6THtuwQtpnlHHavTkKaUfnoldX zaiq+yGt/XqmTN2Uaga1GJiPpGJML8bAZW8lGr1x2yis/8yXfXQDLb8BzR2yfQ4D 1BGWl0VB9MdXPKttELz4J+Y2sI4goO0LKZcg7W8Nf0ygrVl6iP3n6ZUI5GWXJ8LH 4SCWreJ3ieEq/sTwA/MmX3nXNAJafJL8gSalvMPoj0w033QIyMqwvkIUu3YNq0G1 wBTKgZ0kqId6hDlZJJu1 =qfu7 -----END PGP SIGNATURE----- --Apple-Mail=_7EEE690C-291E-4F6A-BEAF-F17DAD12193F--