#include <sys/statfs.h>
int statfs (Path, StatusBuffer) char *Path; struct statfs *StatusBuffer;
int fstatfs (FileDescriptor, StatusBuffer) int FileDescriptor; struct statfs *StatusBuffer;
#include <sys/types.h> #include <ustat.h>
int ustat (Device, Buffer) dev_t Device; struct ustat *Buffer;
The statfs and fstatfs subroutines return information about the mounted file system that contains the file named by the Path or FileDescriptor parameters. The returned information is in the format of a statfs structure, described in the sys/statfs.h file.
The ustat subroutine also returns information about a mounted file system identified by Device. This device identifier is for any given file and can be determined by examining the st_dev field of the stat structure defined in the sys/stat.h file. The returned information is in the format of a ustat structure, described in the ustat.h file. The ustat subroutine is superseded by the statfs and fstatfs subroutines. Use one of these (statfs and fstatfs) subroutines instead.
Upon successful completion, a value of 0 is returned. Otherwise, a value of -1 is returned, and the errno global variable is set to indicate the error.
The statfs, fstatfs, and ustat subroutines fail if the following is true:
EFAULT | The Buffer parameter points to a location outside of the allocated address space of the process. |
The fstatfs subroutine fails if the following is true:
EBADF | The FileDescriptor parameter is not a valid file descriptor. |
EIO | An I/O error occurred while reading from the file system. |
The statfs subroutine can be unsuccessful for other reasons. For a list of additional errors, see "Base Operating System Error Codes For Services That Require Path-Name Resolution".
The statfs subroutine can be unsuccessful for other reasons. For a list of additional errors, see Appendix A, "Base Operating System Error Codes for Services That Require Path-Name Resolution" .
These subroutines are part of Base Operating System (BOS) Runtime.
The stat subroutine.
Files, Directories, and File Systems for Programmers in AIX Version 4.3 General Programming Concepts: Writing and Debugging Programs.