United States-English |
|
|
HP-UX Reference > Sstatfs(2)HP-UX 11i Version 3: February 2007 |
|
NAMEstatfs, fstatfs — get file system statistics SYNOPSIS#include <sys/vfs.h> int statfs(const char *path, struct statfs *buf); int fstatfs(int fildes, struct statfs *buf); DESCRIPTIONstatfs() returns status information for a mounted file system. fstatfs() returns similar information for an open file. The parameters for the statfs() and fstatfs() functions are as follows:
The statfs structure contains the following members: int32_t f_bavail; /* free blocks available to non-superusers or users without the LIMIT privilege */ int32_t f_bfree; /* free blocks */ int32_t f_blocks; /* total blocks in file system */ int32_t f_bsize; /* fundamental file system block size in bytes */ int32_t f_ffree; /* free file nodes in file system */ int32_t f_files; /* total file nodes in file system */ int32_t f_type; /* type of info, zero for now */ fsid_t f_fsid /* file system ID. f_fsid[1] is the file system type; see sysfs(2) */ The fields f_blocks, f_bavail, and f_bfree are expressed in terms of blocks of size f_bsize. A file node is a structure in the file system hierarchy that describes a file. Fields that are undefined for a particular file system are set to -1. Security RestrictionsThe field f_bavail is the number of free blocks available to non-superusers or users without the LIMIT privilege. See privileges(5) for more information about privileged access on systems that support fine-grained privileges. RETURN VALUEstatfs() and fstatfs() return 0 upon successful completion; otherwise, they return -1 and set errno to indicate the error. ERRORSIf statfs() fails, errno is set to one of the following values:
If fstatfs() fails, errno is set to one of the following values:
|
Printable version | ||
|