char *getbsize(int *headersizep,
The getbsize() function determines the user's preferred
block size based on the value of the BLOCKSIZE environment
variable. Commands such as df, du, and
ls can use this to determine the units that should be used
to display sizes. BLOCKSIZE may be specified in units of a
byte by specifying a number, in units of a kilobyte by specifying a number
followed by 'K' or 'k', in units of a megabyte by
specifying a number followed by 'M' or 'm',
and in units of a gigabyte by specifying a number followed by 'G'
Sizes less than 512 or greater than a gigabyte are ignored.
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.
Points to a location where the length of the returned string is to be stored.
Points to a location where the block size is to be stored.
The getbsize() function returns a pointer to a
null-terminated string describing the block size, something like
The length of this string is stored in headerlenp.
The block size is stored in blocksizep.
PTC MKS Toolkit for Professional Developers
PTC MKS Toolkit for Professional Developers 64-Bit Edition
PTC MKS Toolkit for Enterprise Developers
PTC MKS Toolkit for Enterprise Developers 64-Bit Edition
PTC MKS Toolkit 10.3 Documentation Build 39.