Complete man page.

MFC after:	2 weeks
This commit is contained in:
Greg Lehey 2012-11-16 01:41:42 +00:00
parent 59a02420d8
commit c90e931745

View File

@ -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 ,