Subject: Re: statfs, statvfs and friends.
To: enami tsugutomo <enami@sm.sony.co.jp>
From: Simon Burge <simonb@wasabisystems.com>
List: tech-kern
Date: 03/31/2004 15:00:39
On Wed, Mar 31, 2004 at 11:02:23AM +0900, enami tsugutomo wrote:
> christos@zoulas.com (Christos Zoulas) writes:
>
> > 2b. Q: X/Open says we should use unsigned long for bsize, frsize and
> > fsblkcnt_t for the rest. Should we do that?
> > A: I say keep the types as I have them.
>
> do `the rest' includes f_bavail?
SUSv3 says:
The <sys/statvfs.h> header shall define the statvfs structure that
includes at least the following members:
fsblkcnt_t f_blocks Total number of blocks on file system in
units of f_frsize.
fsblkcnt_t f_bfree Total number of free blocks.
fsblkcnt_t f_bavail Number of free blocks available to
non-privileged process.
fsfilcnt_t f_files Total number of file serial numbers.
fsfilcnt_t f_ffree Total number of free file serial numbers.
fsfilcnt_t f_favail Number of file serial numbers available
to non-privileged process.
and that <sys/types> defines the following types:
fsblkcnt_t
[XSI] [Option Start] Used for file system block
counts. [Option End]
fsfilcnt_t
[XSI] [Option Start] Used for file system file
counts. [Option End]
I guess technically we should also use the fsblkcnt_t and fsfilcnt_t
types in struct statvfs too. FWIW, struct statvfs is the only user
of these two types.
Simon.
--
Simon Burge <simonb@wasabisystems.com>
NetBSD Development, Support and Service: http://www.wasabisystems.com/