From ff16940b26eab3cfb42489dc6e1c176415175b38 Mon Sep 17 00:00:00 2001 From: grog Date: Fri, 16 Nov 2012 01:41:42 +0000 Subject: Complete man page. MFC after: 2 weeks --- lib/libc/gen/getbsize.3 | 38 +++++++++++++++++++++++++++----------- 1 file changed, 27 insertions(+), 11 deletions(-) (limited to 'lib/libc/gen') diff --git a/lib/libc/gen/getbsize.3 b/lib/libc/gen/getbsize.3 index 1407051..5a759da 100644 --- a/lib/libc/gen/getbsize.3 +++ b/lib/libc/gen/getbsize.3 @@ -28,12 +28,12 @@ .\" @(#)getbsize.3 8.1 (Berkeley) 6/4/93 .\" $FreeBSD$ .\" -.Dd June 4, 1993 +.Dd November 16, 2012 .Dt GETBSIZE 3 .Os .Sh NAME .Nm getbsize -.Nd get user block size +.Nd get preferred block size .Sh LIBRARY .Lb libc .Sh SYNOPSIS @@ -43,11 +43,31 @@ .Sh DESCRIPTION The .Fn getbsize -function determines the user's preferred block size based on the value of the -.Dq BLOCKSIZE -environment variable; see -.Xr environ 7 -for details on its use and format. +function returns a preferred block size for reporting by system utilities +.Xr df 1 , +.Xr du 1 , +.Xr ls 1 +and +.Xr systat 1 , +based on the value of the +.En BLOCKSIZE +environment variable. +.En BLOCKSIZE +may be specified directly in bytes, or in multiples of a kilobyte by +specifying a number followed by ``K'' or ``k'', in multiples of a +megabyte by specifying a number followed by ``M'' or ``m'' or in +multiples of a gigabyte by specifying a number followed by ``G'' or +``g''. +Multiples must be integers. +.Pp +Valid values of +.En BLOCKSIZE +are 512 bytes to 1 gigabyte. +Sizes less than 512 bytes are rounded up to 512 bytes, and sizes +greater than 1 GB are rounded down to 1 GB. +In each case +.Fn getbsize +produces a warning message. .Pp The .Fn getbsize @@ -61,10 +81,6 @@ terminating null). The memory referenced by .Fa blocksizep is filled in with block size, in bytes. -.Pp -If the user's block size is unreasonable, a warning message is -written to standard error and the returned information reflects -a block size of 512 bytes. .Sh SEE ALSO .Xr df 1 , .Xr du 1 , -- cgit v1.1