From owner-svn-src-head@freebsd.org Sat Jul 20 16:03:54 2019 Return-Path: Delivered-To: svn-src-head@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 DADE2C159E; Sat, 20 Jul 2019 16:03:54 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (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 "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id BC52086D31; Sat, 20 Jul 2019 16:03:54 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 9452ACC66; Sat, 20 Jul 2019 16:03:54 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x6KG3sum038623; Sat, 20 Jul 2019 16:03:54 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x6KG3san038622; Sat, 20 Jul 2019 16:03:54 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201907201603.x6KG3san038622@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Sat, 20 Jul 2019 16:03:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r350179 - head/lib/libutil X-SVN-Group: head X-SVN-Commit-Author: jhb X-SVN-Commit-Paths: head/lib/libutil X-SVN-Commit-Revision: 350179 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: BC52086D31 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.95 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.95)[-0.946,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 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, 20 Jul 2019 16:03:54 -0000 Author: jhb Date: Sat Jul 20 16:03:54 2019 New Revision: 350179 URL: https://svnweb.freebsd.org/changeset/base/350179 Log: expand_number(3) parses suffixes, not prefixes. While here, tidy the opening sentence a bit. MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D20791 Modified: head/lib/libutil/expand_number.3 Modified: head/lib/libutil/expand_number.3 ============================================================================== --- head/lib/libutil/expand_number.3 Sat Jul 20 15:59:49 2019 (r350178) +++ head/lib/libutil/expand_number.3 Sat Jul 20 16:03:54 2019 (r350179) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd August 15, 2010 +.Dd July 20, 2019 .Dt EXPAND_NUMBER 3 .Os .Sh NAME @@ -42,11 +42,10 @@ .Sh DESCRIPTION The .Fn expand_number -function unformats the +function parses the .Fa buf -string and stores a unsigned 64-bit quantity at address pointed out by the -.Fa num -argument. +string and stores a unsigned 64-bit quantity at +.Fa *num . .Pp The .Fn expand_number @@ -54,9 +53,9 @@ function is case-insensitive and follows the SI power of two convention. .Pp -The prefixes are: -.Bl -column "Prefix" "Description" "1000000000000000000" -offset indent -.It Sy "Prefix" Ta Sy "Description" Ta Sy "Multiplier" +The suffixes are: +.Bl -column "Suffix" "Description" "1000000000000000000" -offset indent +.It Sy "Suffix" Ta Sy "Description" Ta Sy "Multiplier" .It Li K Ta No kilo Ta 1024 .It Li M Ta No mega Ta 1048576 .It Li G Ta No giga Ta 1073741824 @@ -74,7 +73,7 @@ function will fail if: .It Bq Er EINVAL The given string contains no digits. .It Bq Er EINVAL -An unrecognized prefix was given. +An unrecognized suffix was given. .It Bq Er ERANGE Result doesn't fit into 64 bits. .El