Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 24 Oct 2019 19:14:38 +0000 (UTC)
From:      John Baldwin <jhb@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org
Subject:   svn commit: r354034 - in stable: 11/lib/libutil 12/lib/libutil
Message-ID:  <201910241914.x9OJEcYp007627@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: jhb
Date: Thu Oct 24 19:14:37 2019
New Revision: 354034
URL: https://svnweb.freebsd.org/changeset/base/354034

Log:
  MFC 350179: expand_number(3) parses suffixes, not prefixes.
  
  While here, tidy the opening sentence a bit.

Modified:
  stable/11/lib/libutil/expand_number.3
Directory Properties:
  stable/11/   (props changed)

Changes in other areas also in this revision:
Modified:
  stable/12/lib/libutil/expand_number.3
Directory Properties:
  stable/12/   (props changed)

Modified: stable/11/lib/libutil/expand_number.3
==============================================================================
--- stable/11/lib/libutil/expand_number.3	Thu Oct 24 19:12:01 2019	(r354033)
+++ stable/11/lib/libutil/expand_number.3	Thu Oct 24 19:14:37 2019	(r354034)
@@ -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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201910241914.x9OJEcYp007627>