From owner-svn-src-head@freebsd.org Sat Apr 15 02:41:01 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 4D80ED3EE73; Sat, 15 Apr 2017 02:41:01 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: from mail-pg0-x241.google.com (mail-pg0-x241.google.com [IPv6:2607:f8b0:400e:c05::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 1A177823; Sat, 15 Apr 2017 02:41:01 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: by mail-pg0-x241.google.com with SMTP id 34so15700330pgx.3; Fri, 14 Apr 2017 19:41:01 -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=3clz1G6XAVVc2KHWDeHsqLNVtbyTMXGvGcXRpKw45xs=; b=ZIARgD/laQ9kb+hL3UmmanIOaZ1nQzGSuurNnrO1dE6n100s44TzbawjrtXCyJSaNz 3zuTs+f0t6rnk4eE0jETwxnEzAnkv6SOzSDmQMzwDWoppSAVoH55orL82FZPvPoJ3Nqw NTtixr39n/o044QC9wm7fV+iKAQTxysu+KtlfTrEGUhdi5bWOxMEiQkML71a/FLBAYMi XYS/hhw2obpIA9fp3hrUKi5I7qDycpBDqjWZoOCquO6kyuaBeLhk/Fq8P8QA9CZYsoYx IP69gB55WtzySUoPLvEHfYAr0jfAal7mAgftebMsc/oItw2XBai9k0ABTHw9DcoBaIn0 czxw== 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=3clz1G6XAVVc2KHWDeHsqLNVtbyTMXGvGcXRpKw45xs=; b=gFQ+tMEG8W6OVIlgINvtWJHrZWXvT9XUKwitRXNMG31dV+oSrB2jVqqtk+YXcus7vU hfeoisvul0br7tjJ7BbvcWK1CWv17I8Ng4lZsact/Zvw1jnDvLmlmW6VTcxKhHrIAC0M Nb3v9utbzkuRvpCgnT11G4tYqLWcUChvlBQTiHSUAxptS3Rb+EaRbpTlcT0LHk0ntIGO dnbZfwC3OA03PkxTLI5vPknnjKut1sjooGHdIsnZD7y88ldLFL4o+qWICzAisdskiKvb suUIvUrUI+TEJKQcVG+50DHdclzy5XGQw1jFF+4ZXU2poQBQJ9n1npopzBCeRbTFVflo QO3A== X-Gm-Message-State: AN3rC/7EavRjONcrFUeq05YBIyyK+Udm8/1sB39jK6MysBmo4aI4bFyS 2tGCQJpToate8ACm0Wo= X-Received: by 10.98.52.193 with SMTP id b184mr645132pfa.82.1492224060279; Fri, 14 Apr 2017 19:41:00 -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 d82sm5369610pfl.124.2017.04.14.19.40.58 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 14 Apr 2017 19:40:58 -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=_D704F685-4935-47FC-9D53-C6152B6B9F90"; protocol="application/pgp-signature"; micalg=pgp-sha512 X-Pgp-Agent: GPGMail From: "Ngie Cooper (yaneurabeya)" In-Reply-To: <201704150149.v3F1nu0D009274@pdx.rh.CN85.dnsmgr.net> Date: Fri, 14 Apr 2017 19:40:57 -0700 Cc: John Baldwin , Ngie Cooper , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Message-Id: <4CBF25DF-F407-4F50-8724-B73F64734E19@gmail.com> References: <201704150149.v3F1nu0D009274@pdx.rh.CN85.dnsmgr.net> 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:41:01 -0000 --Apple-Mail=_D704F685-4935-47FC-9D53-C6152B6B9F90 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 > 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? humanize_number(3) from libutil uses IEC units. > Yes, these are newer standards, perhaps some day we should make a = global > switch to them, but lets not start mixing and matching things. 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. Perhaps there should be a flag baked into humanize_number, etc for = parsing IEC vs non-IEC unit values? Thanks for the input :)! -Ngie --Apple-Mail=_D704F685-4935-47FC-9D53-C6152B6B9F90 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 iQIcBAEBCgAGBQJY8Yg5AAoJEPWDqSZpMIYVGtkP/RkTXwoej2EaIuPE/hJDOKk1 aKqIsNETeXbzHEeLnIxGMIdEjdxPLSQ7blIMsju67lFBRi0CDnYOHNa2Qy6cltUC ZclqMH+1wkvenu8j5H13KMeqjclXLHnmZJ8HzZfTTjhAUE9k/tYFl/UCEigDFe7w vhwfa2l06D+jPXQuM/pb3TqFrwPKv4x1EB/EYhnhSzgexgXZ5sxxBeHM9+uFfeC4 +62M60IpJWDotj1quAicYtWHqrtGtpVl62LRcRFJ664kfcqch1/5YhB7u4Ow4d1g g1BJYcgS1WAsCqBT0tACACWnJMEk1GR0vxCDFqYbEabnGJ1BQPSp9ctd+7PHjvQq vCHe0kYE+jiYgkvo8E+wBanuVM9bjWeuRqijiwr9jQ+cE4LXr61A7wnWdJpsE6O7 LghVkG/keWkv0Mev5TdsOg73TlW8yDauo/GlIczeB2U7EIDe6h8MYFF5FvtNuUpd 40BIjwEw5gidp4luiWDmk4aVKMNYqBmV9t4RcNZ2uh496bFtW+cCLjl108xkxuf6 Ue/BLDzWE7kn93F/wBG3qfkQ5LQGrVaUE7vTxP5LeVks5fvxsqn1YYt4E+pkm8ZN 4BaqBrd7mobgGJgB3i+X9AD9R2iOlyprVSfBDhl1xhR+/z+MhflWIp8JwGQppnjL v3QKHADSxxOA2QhmXztk =q2LA -----END PGP SIGNATURE----- --Apple-Mail=_D704F685-4935-47FC-9D53-C6152B6B9F90--