Syntax | #include <sys/statvfs.h> int fstatvfs (int fildes, struct statvfs *buf); | |
Description |
fildes identifies an open file descriptor that is the result of a successful There is no difference in functionality between The u1ong_t f_bsize; /* Preferred block size of the file system */ u1ong_t f_frsize; /* Basic block size of the file system (if supported) */ fsblkcnt_t f_blocks; /* Total number of blocks on the file system in units of f_frsize */ fsblkcnt_t f_bfree; /* Total number of free blocks */ fsblkcnt_t f_bavail; /* Number of available free blocks for a non-system administrator */ fsfilcnt_t f_files; /* Total number of files (inodes) */ fsfilcnt_t f_ffree; /* Total number of free nodes */ fsfilcnt_t f_favail; /* Number of inodes for a non-system administrator */ ulong_t f_fsid; /* File system ID (currently dev) */ char f_basetype[FSTYPSZ]; /* Type name of destination file system, null-terminated */ ulong_t f_flag; /* Bit mask of the options */ ulong_t f_namemax; /* Maximum length of the file names */ char f_fstr[32]; /* File-system-specific string */ ulong_t f_filler[16]; /* Reserved for future extensions */ The fsblkcnt64_t f_blocks fsblkcnt64_t f_bfree fsblkcnt64_t f_bavail fsfilcnt64_t f_files fsfilcnt64_t f_ffree fsfilcnt64_t f_favail
The following values can be returned in the ST_RDONLY 0x01 /* Write-protected file system */ ST_NOSUID 0x02 /* setuid/setgid semantics are not supported */ ST_NOTRUNC 0x04 /* Does not truncate file name longer than NAME_MAX*/
| |
Return val. | 0 -1 | if successful. if an error occurs. |
Errors |
| |
|
| An I/O error occurs during reading of the file system. |
|
| A signal was received during execution of the function. |
|
| |
|
| fildes is not an open file descriptor. |
|
| One of the values returned cannot be represented correctly in the structure pointed to by buf, . |
| ||
|
| No search authorization exists for a component of the path prefix. |
|
| Too many symbolic links were encountered in resolving path. |
|
| |
The pathname to which path points is longer than | ||
|
| A component of the pathname does not exist, or path points to an empty |
|
| A component of the path prefix of path is not a directory. |
|
| |
| The resolving of symbolic links in the pathname leads to an interim result whose length exceeds | |
Notes | Not all elements of the | |
See also |
|